This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mac OS X | |
*.DS_Store | |
# Xcode | |
*.pbxuser | |
*.mode1v3 | |
*.mode2v3 | |
*.perspectivev3 | |
*.xcuserstate | |
project.xcworkspace/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class Singleton<T> where T : class | |
{ | |
private static volatile T _instance; | |
private static readonly object _locker = new object(); | |
public static T Instance | |
{ | |
get | |
{ | |
if (_instance == null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try | |
{ | |
HOME: | |
do | |
{ | |
Play("World of Warcraft"); | |
} | |
while (!asleep); | |
Thread.Sleep(12 * 60 * 60 * 1000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public TEntity GetEntityByPrimaryKey(object pkKey, params object[] pkKeys) | |
{ | |
List<object> primaryKeys = new List<object>(); | |
primaryKeys.Add(pkKey); | |
primaryKeys.AddRange(pkKeys); | |
TEntity entity = null; | |
Type entityType = typeof(TEntity); | |
using (DataContext dataContext = new DataContext(this._DbConnection)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WcfDataTable : DataTable, IXmlSerializable | |
{ | |
private string _ServerName; | |
public WcfDataTable() | |
: base() | |
{ } | |
public WcfDataTable(string tableName) | |
: base(tableName) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WindowHandleInfo | |
{ | |
private delegate bool EnumWindowProc(IntPtr hwnd, IntPtr lParam); | |
[DllImport("user32")] | |
[return: MarshalAs(UnmanagedType.Bool)] | |
private static extern bool EnumChildWindows(IntPtr window, EnumWindowProc callback, IntPtr lParam); | |
private IntPtr _MainHandle; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
usage () | |
{ | |
cat <<UsageHERE | |
boot2docker-fwd -- Helper function to quickly manage port forwards between the boot2docker-vm and the host | |
Usage: boot2docker-fwd [ -n RULE_NAME ] [ -h HOST_PORT ] [ -p {tcp|udp} ] [ -i HOST_IP ] GUEST_PORT | |
or boot2docker-fwd -d RULE_NAME | |
or boot2docker-fwd -l | |
or boot2docker-fwd -A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io" | |
"sync" | |
"time" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exec 1<&- | |
exec 2<&- | |
exec 1<>/tmp/container-hook.log | |
exec 2>&1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CapsLock => No Action | |
Option => Command | |
Command => Option | |
Control => Control |
OlderNewer