I hereby claim:
- I am ploxiln on github.
- I am ploxiln (https://keybase.io/ploxiln) on keybase.
- I have a public key ASBuXt0Bz7WxQl9CtCURyVlCPSn59-kT6xpk9ufP6KLbhgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Provides an http interface to nsq consumers.
NOTE: This has not updated since before nsqio/pynsq#117 "nsq.Reader.disabled() no longer effective" was fixed.
nsqd
already provides an http interface to nsq publishers - just
POST data to /put?topic=$TOPIC
, typically to the nsqd running locally,
#!/bin/bash | |
# This uses linux "transport control" aka tc to affect OUTGOING packets. | |
# For more information about "netem", the network emulation module, see: | |
# http://www.linuxfoundation.org/collaborate/workgroups/networking/netem | |
# http://lartc.org/howto/index.html section 9 and 12. | |
usage() { | |
echo "USAGE: $(basename $0) --interface=<ethX> (--dport=<PORT> | --host=<IP>) (--delay=<DELAY_SPEC> | --loss=<LOSS_SPEC>) --start" | |
echo " $(basename $0) --interface=<ethX> (--stop | --status)" |
import java.util.Arrays; | |
import java.util.Comparator; | |
class EvenFirst implements Comparator<Integer> { | |
public int compare(Integer a, Integer b) { | |
return a % 2 - b % 2; | |
} | |
} | |
public class SortTest { |
// nodejs script to compare npm-shrinkwrap files | |
// TODO check errors with files and report nicely | |
var fs = require('fs'); | |
var path = require('path'); | |
function usage() { | |
console.log("USAGE: %s %s (--needs-delete|--compare)" | |
+ " <actual-shrinkwrap-file> <target-shrinkwrap-file>", | |
path.basename(process.argv[0]), path.basename(process.argv[1]) ); |
/************************************************************************************************* | |
UTF-8 validation test | |
UTF-8 is used for encoding text, which means, mapping the bytes in a file to meaningful characters. | |
ASCII is the classic, once ubiquitous encoding in the western world. It uses a single byte per | |
character, and uses only the lower 7 bits of that byte. It can only represent the characters on a | |
US keyboard (as well as tab and carriage return etc). Other encodings exist which also use a single | |
byte per character, but use all 8 bits, like ISO-8859-1, or use multible bytes per character, like | |
UCS-32 which always uses 4 bytes per character. These encodings can represent many more characters, | |
such as accented ones. |