I hereby claim:
- I am ianbishop on github.
- I am ianbishop (https://keybase.io/ianbishop) on keybase.
- I have a public key ASACutJ_DBlRFhlPPWl9nwHV12W_LD33pQgv2zAidyYfRgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| { | |
| init: function(elevators, floors) { | |
| var floorsWithPassengersDown = []; | |
| var floorsWithPassengersUp = []; | |
| for (var e = 0; e < elevators.length; e++){ | |
| elevators[e].on("idle", function() { | |
| var floorsWithPassengers = floorsWithPassengersDown.concat(floorsWithPassengersUp); | |
| var currentFloor = this.currentFloor(); | |
| var floorNum = 0; |
| (defn search [queue matcher agent & params] | |
| (->> queue | |
| (filter #(apply m/matches matcher % agent params)) | |
| sorted-set)) | |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
I hereby claim:
To claim this, I am signing this object:
| var counts = {}; | |
| var total = 0; | |
| function freqIP(ip) { | |
| var count = counts[ip]; | |
| if (count == undefined) | |
| count = 1; | |
| else | |
| count++; |
| #!/usr/bin/env ruby | |
| require 'rugged' | |
| include Rugged | |
| repo = Repository.new("/home/ian/open-source/stripe/level1/level1") | |
| difficulty = "001"# `cat difficulty.txt` | |
| index = repo.index |
| parallelSearch = (keywords, cb) -> | |
| out = [] | |
| await | |
| for k,i in keywords | |
| search k, defer out[i] | |
| cb out | |
| serialSearch = (keywords, cb) -> | |
| out = [] |
| require 'faraday' | |
| require 'faraday_middleware' | |
| conn = Faraday.new(:url => 'your-url') do |faraday| | |
| faraday.use FaradayMiddleware::EncodeJson | |
| faraday.use Faraday::Response::RaiseError | |
| faraday.use Faraday::Response::ParseJson | |
| faraday.adapter Faraday.default_adapter | |
| end |
| Testing Deep Freeze | |
| =================== | |
| - write mean: 312.07 µs | |
| - read mean: 42.05 µs | |
| Testing Carbonite | |
| ================= | |
| - write mean: 177.35 µs | |
| - read mean: 202.58 µs |