Skip to content

Instantly share code, notes, and snippets.

View MarkWalls's full-sized avatar

Mark Walls MarkWalls

  • Motus Developers
  • Portland Oregon
View GitHub Profile
export interface Action<T> {
type: string
payload: T
}
interface ActionCreator<T> {
type: string
(payload: T): Action<T>
}
<div ng-app="videoApp" ng-controller="VideoController">
<table>
<thead>
<th>Title</th>
<th>Length</th>
<th></th>
</thead>
<tbody>
<tr data-id="{{video.Id}}" ng-repeat="video in videos">
@echo off
setlocal EnableExtensions
set tfuser=glombard
set tflogin=/login:DOMAIN\%tfuser%,password
set tfworkspace=TFSWorkspace
set tfdir=C:\temp\MyWorkspace
set tfsource=$/PROJ/Source
set tfurl=http://127.0.0.1:8080/tfs/TEAM/
@echo off
setlocal EnableExtensions
set tfuser=glombard
set tflogin=/login:DOMAIN\%tfuser%,password
set tfworkspace=TFSWorkspace
set tfdir=C:\temp\MyWorkspace
set tfsource=$/PROJ/Source
set tfurl=http://127.0.0.1:8080/tfs/TEAM/
@MarkWalls
MarkWalls / Dynamic.cs
Created November 18, 2013 23:51
Dynamic ExpandoObject work
[Test]
public void TestDynamic() {
dynamic employee = new ExpandoObject();
employee.Name = "Nothing";
((INotifyPropertyChanged)employee).PropertyChanged +=
new PropertyChangedEventHandler(HandlePropertyChanges);
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
// Add the CertEnroll namespace
using CERTENROLLLib;
@MarkWalls
MarkWalls / Resolve.cs
Created September 28, 2013 02:03
From: http://blogs.msdn.com/b/microsoft_press/archive/2010/02/03/jeffrey-richter-excerpt-2-from-clr-via-c-third-edition.aspx How to resolve external dependencies on startup. Embed them as resources, then when .NET looks for them resolve them internally. Thoughts: Could extend this - if it doesn't find it in the resources, look in the root direct…
AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => {
String resourceName = "AssemblyLoadingAndReflection." +
new AssemblyName(args.Name).Name + ".dll";
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)) {
Byte[] assemblyData = new Byte[stream.Length];
@MarkWalls
MarkWalls / iUnitOfWork.cs
Created September 25, 2013 21:37
iUnitOfWork
public interface IUnitOfWork
{
void SaveChanges();
IRepository CustomerRepository { get; }
IRepository ProductRepository { get; }
IRepository OrderRepository { get; }
}
public OrderController(IUnitOfWork unitOfWork )
{
#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
@MarkWalls
MarkWalls / index.js
Created April 20, 2012 06:28 — forked from jankuca/index.js
Simple Facebook Graph API Node.js Client
var HTTPS = require('https');
var QueryString = require('querystring');
/**
* Facebook API Wrapper
* @constructor
* @param {Object} info Info about a Facebook application
*/
var Client = function (info) {
if (!info.KEY || !info.SECRET || !info.ID) {