To run this, you can try:
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
// @file console-dir.js | |
// @brief | |
// @author ongaeshi | |
// @date 2011/06/02 | |
// | |
// -------------------------------------- | |
// console.dir({a: 1, b: 2, c: 3}); | |
// => | |
// info: | |
// a: 1 |
#!/usr/bin/perl | |
# HAProxy Performance Statistics | |
# by Steve Kamerman | |
# | |
# To use, pipe your HAProxy log with timing information (like "0/0/1/1/3 200") to | |
# this script. It will output min, max, med, avg and a latency distribution graph. | |
# | |
# Info on timing logging in HAProxy: http://code.google.com/p/haproxy-docs/wiki/TimingEvents | |
# |
import pymongo | |
from mongokit.database import Database | |
# code copied and adapted from mongokit (3-clause BSD license) | |
class CallableMixin(object): | |
""" | |
brings the callable method to a Document. usefull for the connection's | |
register method | |
""" |
To run this, you can try:
curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh
chmod +x ./uninstall-node.sh
./uninstall-node.sh
rm uninstall-node.sh
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
package com.actionbarsherlock.app; | |
import android.app.Activity; | |
import android.support.v4.app.Watson.OnCreateOptionsMenuListener; | |
import android.support.v4.app.Watson.OnOptionsItemSelectedListener; | |
import android.support.v4.app.Watson.OnPrepareOptionsMenuListener; | |
import com.actionbarsherlock.app.SherlockFragmentActivity; | |
import com.actionbarsherlock.internal.view.menu.MenuItemWrapper; | |
import com.actionbarsherlock.internal.view.menu.MenuWrapper; |
# NO LONGER MAINTAINED | |
# SEE https://gist.github.com/sparanoid/abb6e26d968accef9aa2 FOR UPDATE | |
DES_PATH=/usr/share | |
PUB_PATH=/srv/www/domain.tld/public_html | |
ST_DIR=speedtest | |
wget http://c.speedtest.net/mini/mini.zip -O $DES_PATH/$ST_DIR.zip --limit-rate=200000k | |
unzip -o $DES_PATH/$ST_DIR.zip -d $DES_PATH/$ST_DIR | |
# Remove old public files |
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"route53:ChangeResourceRecordSets", | |
"route53:GetHostedZone", | |
"route53:ListResourceRecordSets" | |
], | |
"Effect": "Allow", | |
"Resource": [ |