This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ids = [291, 9123, 218]; | |
client.query( | |
'SELECT * FROM campaigns WHERE campaign_id IN (?)', | |
[ ids ], | |
function selectCb(err, results, fields) { | |
if (err) { | |
console.log(err); | |
throw err; | |
} | |
console.log(results); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var spawn = require('child_process').spawn; | |
var proc = spawn('/path/to/executable', ['param1', 'param2', 'param3']); | |
var self = { | |
_stdoutBuf: '', | |
_stderrBuf: '' | |
}; | |
proc.stdout.on('data', function(data) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version node_uuid_v1_string node_uuid_v1_buf node_uuid_v4_string node_uuid_v4_buf libuuid_v4_string libuuid_v4_binary uuidjs_v1_string uuidjs_v4_string 140byte_es_v4 | |
0.4.12 880183 729465 1.24115e+06 826444 246295 265074 217654 371096 184442 | |
0.5.10 1.48504e+06 1.22108e+06 231354 186444 190173 213507 343986 492219 197463 | |
0.6.0 1446553 1.11238e+06 227864 185221 167569 178823 358566 558284 205497 | |
0.6.3 1.44182e+06 1.09582e+06 227247 182816 191369 207347 357010 550478 207418 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum error before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : false, // Standard browser globals e.g. `window`, `document`. | |
"node" : true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# WARNING: Don't use this in production since all passwords are kept at their default. | |
# mongodb | |
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
echo -e "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen\n" > /etc/apt/sources.list.d/mongodb-10gen.list | |
apt-get update | |
apt-get install -y mongodb-10gen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# clone harddisk from one machine to harddisk on another machine over the network | |
# on the target: | |
nc -l -p 7000 | gunzip | dd of=/dev/sda & | |
# on the source: | |
dd if=/dev/sda | gzip | nc <TARGET_IP> 7000 -q 10 & | |
# progress (on the source): | |
# get pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TARGET=192.168.2.10 | |
sysctl net.ipv4.ip_forward=1 | |
iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination $TARGET:80 | |
iptables -t nat -A POSTROUTING -j MASQUERADE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Shape_orig.js 2011-09-01 16:54:43.000000000 +0200 | |
+++ Shape.js 2011-09-01 18:44:39.000000000 +0200 | |
@@ -24,6 +24,17 @@ | |
/* End Definitions */ | |
+ image: function (surface, opts) { | |
+ return surface.add(Ext.applyIf({ | |
+ type: 'image', | |
+ x: opts.x - opts.radius, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat list.txt | sed 's/\(.*\)/"\1",/;1s/^/[/;$s/.$/]/' > list.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JSFILES = $(shell find lib test -name "*.js") | |
jshint: force | |
jshint $$JSFILES --config test/share/jshint.conf | |
gjslint: force | |
gjslint --debug_indentation --nojsdoc --unix_mode \ | |
-e test/fixtures -r lib -r test | |
check: jshint gjslint |
OlderNewer