I hereby claim:
- I am ottbot on github.
- I am robert (https://keybase.io/robert) on keybase.
- I have a public key whose fingerprint is D9F9 5ED5 1DAF FB7A C478 9E5D 1A53 DA36 0447 9157
To claim this, I am signing this object:
(ns throttle-example | |
(:require [manifold.stream :as s])) | |
;; should limit to 1 per sec ? | |
(def a (s/throttle 1 (s/stream))) | |
(dotimes [n 100] | |
(s/put! a n)) | |
(defn now [] |
(require '[clj-http.client :as client]) | |
(def token "a-token") | |
(defn fetch-projects [] | |
(:body | |
(client/get "https://circleci.com/api/v1/projects" | |
{:query-params {"circle-token" token} | |
:accept :json | |
:as :json}))) |
I hereby claim:
To claim this, I am signing this object:
.DS_Store | |
Gemfile.lock | |
*.pem | |
node.json | |
tmp/* | |
!tmp/.gitignore |
#!/usr/bin/ruby | |
# This script installs to /usr/local only. To install elsewhere you can just | |
# untar https://github.com/FundingCircle/homebrew/tarball/master anywhere you like. | |
module Tty extend self | |
def blue; bold 34; end | |
def white; bold 39; end | |
def red; underline 31; end | |
def reset; escape 0; end | |
def bold n; escape "1;#{n}" end |
require 'formula' | |
def mysql_installed? | |
`which mysql_config`.length > 0 | |
end | |
class Php < Formula | |
url 'http://www.php.net/get/php-5.3.8.tar.gz/from/this/mirror' | |
homepage 'http://php.net/' |
vi = w.vortices[step]; | |
fx = -vi.gamma * (vi.y - vi.yI)/w.dt; | |
fy = -vi.gamma * (vi.xI - vi.x)/w.dt; | |
/* average with previous shed vortex */ | |
if (step >= 1) { | |
vi = w.vortices[step - 1]; | |
fx = (fx + (-vi.gamma * (vi.y - vi.yI)/w.dt))/2.; | |
fy = (fy + (-vi.gamma * (vi.xI - vi.x)/w.dt))/2.; |
require 'rubygems' | |
require 'sequel' | |
DB = Sequel.connect('mysql://test:test@localhost/test') unless defined?(DB) | |
[:foos].each do |t| | |
DB.create_table? t do | |
primary_key :id | |
String :name |
require 'sinatra/base' | |
module Sinatra | |
module Editable | |
def self.registered(app) | |
app.set :editable_route, '/editable' | |
app.get "#{options.editable_route}/*" do |
class Story < Sequel::Model | |
require 'image_science' | |
attr_accessor :photo_upload | |
def after_save | |
super | |
process_upload! | |
end | |