The only cross-platform browser that fits in a Gist!
One line install. Works on Linux, MacOSX and Windows.
$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
# coding=utf-8 | |
""" | |
LICENSE http://www.apache.org/licenses/LICENSE-2.0 | |
""" | |
import datetime | |
import sys | |
import time | |
import threading | |
import traceback | |
import SocketServer |
Copyright (c) 2013 Ross Kirsling | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
$ redis-cli --csv subscribe '__keyevent@0__:expired' | |
Reading messages... (press Ctrl-C to quit) | |
"subscribe","__keyevent@0__:expired",1 | |
"message","__keyevent@0__:expired","key:rand:000000006649" | |
"message","__keyevent@0__:expired","key:rand:000000000492" | |
"message","__keyevent@0__:expired","key:rand:000000002777" | |
"message","__keyevent@0__:expired","key:rand:000000006915" | |
"message","__keyevent@0__:expired","key:rand:000000008335" | |
"message","__keyevent@0__:expired","key:rand:000000005386" | |
"message","__keyevent@0__:expired","key:rand:000000001421" |
def greatest_prime_factor(n) | |
divider = 2 | |
finder = n | |
factors = [] | |
while divider < finder | |
if n%divider == 0 | |
factors << divider | |
finder = finder/divider | |
factors << finder | |
end |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
> ~/tcp_redis_monitor.py 6379 | |
Timestamp Nb TX bytes RX bytes TX RMA RX RMA | |
1333983822.943 1 0 0 0.000 0.000 | |
1333983823.193 1 0 0 0.000 0.000 | |
1333983824.194 1 0 0 0.000 0.000 | |
1333983825.195 1 0 0 0.000 0.000 | |
1333983826.196 1 0 0 0.000 0.000 |
#!/usr/bin/env python | |
# coding: UTF-8 | |
# code extracted from nigiri | |
import os | |
import datetime | |
import sys | |
import traceback | |
import re |
/** Class: Strophe.WebSocket | |
* XMPP Connection manager. | |
* | |
* Thie class is the main part of Strophe. It manages a BOSH connection | |
* to an XMPP server and dispatches events to the user callbacks as | |
* data arrives. It supports SASL PLAIN, SASL DIGEST-MD5, and legacy | |
* authentication. | |
* | |
* After creating a Strophe.Connection object, the user will typically | |
* call connect() with a user supplied callback to handle connection level |