This file contains hidden or 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 Application = { | |
faye: null, | |
init: function(){ | |
Map.init(); | |
Application.init_faye(); | |
}, | |
init_faye: function(){ |
This file contains hidden or 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
RestClient.post 'http://localhost:9292/faye', :message => {:channel => "/markers_ip", :data => {"lat" => 52.0, "lng" => 2.0, :ip => "0.0.0.0" } }.to_json | |
RestClient.post 'http://localhost:9292/faye', :message => {:channel => "/markers_address", :data => { "address" => "N15 3PR London" } }.to_json |
This file contains hidden or 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
Mummy.define {{ | |
:left => /\w{3,10}/.gen, | |
:right => /\w{3,10}/.gen | |
}} | |
Mummy.define(:custom) {{ | |
:center => /\w{3,10}/.gen | |
}} |
This file contains hidden or 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
mummy = Mummy.generate(:custom, :mumble => true) |
This file contains hidden or 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 | |
# My single node ReplicaSet quick test script | |
mkdir -p /tmp/rs1 | |
mkdir -p /tmp/rs2 | |
mongod --rest --replSet myset & | |
mongod --rest --replSet myset --dbpath /tmp/rs1 --port 30000 & | |
mongod --rest --replSet myset --dbpath /tmp/rs2 --port 40000 & |
This file contains hidden or 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
require 'redis' | |
class RQue | |
attr_reader :name, :connection | |
def initialize(name) | |
@name = name | |
@connection = Redis.new | |
end |
This file contains hidden or 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 | |
mongo localhost:27017/data_gatherer test.js |
This file contains hidden or 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/zsh | |
# my personal everyday mongodb build script | |
# clean | |
scons --clean | |
# pull new changes | |
git pull | |
# build into prefixed directory |
This file contains hidden or 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
function sample(a, b){ | |
return console.log(a + b); | |
} | |
function argless(){ | |
console.log("Argless lol"); | |
} | |
function before(foo, filter, args){ | |
return function(){ |
This file contains hidden or 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
14:08 kuba@MacBook-Jakub-Oboza:~% ab -c 10 -n 15000 http://127.0.0.1:8081/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 127.0.0.1 (be patient) | |
Completed 1500 requests | |
Completed 3000 requests | |
Completed 4500 requests | |
Completed 6000 requests |