##Ubuntu Server
sudo apt-get install g++ curl libssl-dev apache2-utils git-core make
cd /usr/local/src
wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz
tar -xvzf node-v0.10.28.tar.gz
cd node-v0.10.28
//author: Sun, Junyi (weibo.com/treapdb) | |
//usage: node --nouse-idle-notification --expose-gc --max-old-space-size=8192 memcached.js | |
var config ={ | |
port: 11211, | |
max_memory: 100 // default 100M bytes | |
} | |
var net = require('net'); | |
var LRU = function (max) { // this LRU implementaion is based on https://github.com/chriso/lru |
!function() { | |
var doc = document, | |
htm = doc.documentElement, | |
lct = null, // last click target | |
nearest = function(elm, tag) { | |
while (elm && elm.nodeName != tag) { | |
elm = elm.parentNode; | |
} | |
return elm; | |
}; |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Net.Sockets; | |
using System.Data; | |
using System.Net; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Reactive.Linq; |
void Main() | |
{ | |
var ignores = new Regex[] | |
{ | |
new Regex(@"Approval"), | |
new Regex(@"Test"), | |
new Regex(@"Demo") | |
}; | |
var serviceControl = @"C:\Code\Particular\ServiceControl\src\"; | |
Util.Image("http://yuml.me/diagram/scruffy;scale:150/class/" + String.Join(",", GetDependencies(serviceControl, ignores))).Dump(); |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Web.Http; | |
using System.Web.Http.Tracing; | |
using System.Reflection; | |
using Owin; |
public sealed class RedirectToDynamicEvent | |
{ | |
public readonly IDictionary<Type, List<Wire>> Dict = new Dictionary<Type, List<Wire>>(); | |
public sealed class Wire | |
{ | |
readonly MethodInfo _method; | |
public Type ParameterType; | |
readonly object _subject; | |
readonly bool _includeVersion; |
using Nancy; | |
using Nancy.Responses; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
namespace DotNetBook.Primer | |
{ | |
public class Recipe | |
{ | |
private readonly JArray recipes = new JArray(); |
This gist contains:
Write-Host "Downloading spark..." |