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 | |
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/ | |
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server | |
############################################### | |
# To use: | |
# wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh | |
# chmod 777 install-redis.sh | |
# ./install-redis.sh | |
############################################### | |
echo "*****************************************" |
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
{ | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": "S3:*", | |
"Resource": "arn:aws:s3:::foo/*", | |
"Condition": {} | |
}, | |
{ | |
"Effect": "Allow", |
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 _ = require('highland'), | |
redis = require('redis'), | |
client = redis.createClient(); | |
var pattern = process.argv[2], | |
count = process.argv[3] || 10 | |
client.on('error', function(err) { | |
throw err | |
}); |
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
dataStream.pipe(reactStream).pipe(dataStream) |
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 ObserveStream = require('observ-stream') | |
var ReactWriteStream = require('react-write-stream') | |
var state = require('./state') | |
var Row = require('./row') | |
ObserveStream(state) | |
.pipe(ReactWriteStream(Row, document.getElementById('example')) | |
setInterval(function() { | |
state.age.set(state.age()++) |
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 fs = require('fs') | |
var benchmark = require('benchmark') | |
var suite = new benchmark.Suite() | |
var xmlNodes = require('../index.js') // xml-nodes/buffers | |
var xmlNodesStr = require('../index-str.js') // xml-nodes/master | |
// start benchmarking | |
suite | |
.add('buffers', { | |
'defer' : 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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night-Eighties.tmTheme", | |
"create_window_at_startup": false, | |
"font_face": "Droid Sans Mono", | |
"font_size": 19.0, | |
"highlight_line": true, | |
"remember_full_screen": true, | |
"scroll_past_end": 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
var jsonStream = jsonObjectWriteStream() | |
fs.createReadStream(‘path/to/description’) | |
.pipe(jsonStream.createAttributeWriteStream(’description’)) | |
jsonStream.pipe(process.stdout) | |
// {“description”: “whatever was inside the path/to/description file”} |
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 dragDrop = require('drag-drop') | |
var createReadStream = require('filereader-stream') | |
var zlib = require('zlib') | |
dragDrop('#dropTarget', function (files, pos) { | |
createReadStream(files[0]) | |
.pipe(zlib.createGzip()) | |
.on('data', function (data) { | |
console.log(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
public class While { | |
private static final long iterations = 1000000000; | |
private static long count = 0; | |
public static void main(String[] args) { | |
long start = System.currentTimeMillis(); | |
while (count < iterations * 10) { | |
count++; | |
} |
OlderNewer