A timeline of the last four years of detecting good old window.localStorage
.
October 2009: 5059daa
#!/usr/local/bin/perl | |
# DoS tool for memcached | |
# ulimit -n 15000; perl memcachedos.pl 127.0.0.1 11211 3 | |
# original: http://gist.github.com/522741 | |
# This is Public Domain Software | |
use strict; | |
use warnings; | |
use AnyEvent; |
snippet doc | |
/** | |
* ${1} | |
*/ | |
snippet dochead | |
/** | |
* @fileoverview ${1} | |
* @author ${2} | |
* @version ${3} |
##### nginxでリバースプロキシして後段でエラーが発生した場合にnginx側でエラーページの制御をしたい時の設定 ##### | |
proxy_intercept_errors on; # errorをproxy側で肩代わりする設定 | |
error_page 403 404 500 502 503 504 /error.html; # /var/www/html/error.htmlを置いておく | |
location /error.html { | |
root /var/www/html/; | |
} | |
#### headerの値を参照する #### | |
$http_フィールド名 |
var Benchmark = require('benchmark'); | |
var options = { | |
onStart : function() { | |
console.log('h1. ' + this.name + 'で一番速いのは?'); | |
}, | |
onCycle : function(event, bench) { | |
console.log('* ' + bench.name + '\t' + bench.hz.toFixed(bench.hz < 100 ? 2 : 0)); | |
}, | |
onComplete : function() { |
#!/bin/sh | |
# add a simple 'nuget' command to Mac OS X under Mono | |
# get NuGet.exe binary from http://nuget.codeplex.com/releases/view/58939 | |
# get Microsoft.Build.dll from a Windows .NET 4.0 installation | |
# copy to /usr/local/bin and Robert is your father's brother.... | |
# | |
PATH=/usr/local/bin:$PATH | |
mono --runtime=v4.0 /usr/local/bin/NuGet.exe $* |
fizz = function f() { | |
fizz = function () { | |
fizz = function () { | |
fizz = f | |
return "Fizz" | |
} | |
} | |
} | |
buzz = function f() { |
// These 'settings' put on the navigator will result in a plugin detection, not ActiveX | |
// I will link a gist for IE when I finish that one. | |
// edit: Link to IE example: https://gist.github.com/3796408 | |
var SHOCKWAVE_FLASH = "Shockwave Flash", | |
FLASH_MIME_TYPE = "application/x-shockwave-flash"; | |
this.Given(/^some step that tests Flash availability$/, function(callback) { | |
// Tell Zombie to pose as Safari 5.0 | |
browser = new zombie.Browser({ |
var express = require('express'), | |
httpProxy = require('http-proxy'), | |
app = express(); | |
var proxy = new httpProxy.RoutingProxy(); | |
function apiProxy(host, port) { | |
return function(req, res, next) { | |
if(req.url.match(new RegExp('^\/api\/'))) { | |
proxy.proxyRequest(req, res, {host: host, port: port}); |
# -*- coding: utf-8 -*- | |
#Copyright (C) 2013 Seán Hayes | |
import my_project.settings as dj_settings | |
from fabric.api import local, run, sudo, env, prompt, settings, cd, parallel, execute | |
from fabric.contrib.files import exists | |
from fabric.decorators import hosts, roles, runs_once | |
import json | |
import logging | |
import os |
A timeline of the last four years of detecting good old window.localStorage
.
October 2009: 5059daa