I hereby claim:
- I am ltw on github.
- I am ltw (https://keybase.io/ltw) on keybase.
- I have a public key whose fingerprint is 5A72 31D2 CA91 4525 3F9F 7ACE 1FB5 E1E6 7F97 AB9D
To claim this, I am signing this object:
| def get_bucket(buckets_filled, max_buckets, idx) | |
| quot, rem = idx.divmod(2) | |
| quot = rem == 1 ? quot + (max_buckets/2) : quot | |
| quot > buckets_filled ? :B : :A | |
| end | |
| p get_bucket(11, 12, 8) == :A ? "OH YEAH 1" : "shit 1" # AAAAAAAAAAAB | |
| p get_bucket( 1, 12, 11) == :B ? "OH YEAH 2" : "shit 2" # ABBBBBBBBBBB | |
| p get_bucket(11, 20, 1) == :A ? "OH YEAH 3" : "shit 3" # AAABABABABABABABABAB | |
| p get_bucket(11, 37, 1) == :B ? "OH YEAH 4" : "shit 4" # ABABABABABABABABABABABBBBBBBBBBBBBBBB |
| (import '[org.eclipse.jetty.server.handler GzipHandler]) | |
| (defn- configurator [server] | |
| "Ask Jetty to gzip." | |
| (.setHandler server | |
| (doto (new GzipHandler) | |
| (.setMimeTypes "text/html,text/plain,text/xml,application/xhtml+xml,text/css,application/javascript,text/javascript,image/svg+xml,application/json,application/clojure") | |
| (.setHandler (.getHandler server))))) | |
| (run-jetty #'app {:port port :join? false :configurator configurator}) |
| ± SILENT=true cap torquebox:squash:uat torquebox:install | |
| * 2013-11-20 11:05:10 executing `torquebox:squash:uat' | |
| triggering start callbacks for `torquebox:install' | |
| * 2013-11-20 11:05:10 executing `multiconfig:ensure' | |
| * 2013-11-20 11:05:10 executing `torquebox:install' | |
| * executing "IMMUTANT_HOME=/absolute/path/to/the/immutant-1.0.1-slim ~/bin/lein immutant overlay torquebox" | |
| servers: ["my-server-uat.dcs1"] | |
| [my-server-uat.dcs1] executing command | |
| ** [out :: my-server-uat.dcs1] Downloading http://downloads.immutant.org/incremental/torquebox/LATEST/torquebox-dist-bin.zip | |
| ** [out :: my-server-uat.dcs1] [=> ] 3% 2.29MB / 62.23MB |
I hereby claim:
To claim this, I am signing this object:
| gcof () { | |
| git branch | cut -c 3-1000 | grep $1 | head -1 | xargs git checkout | |
| } | |
| # $ git branch | |
| # * master | |
| # remember-the-fifth-of-november | |
| # $ gcof fifth | |
| # Switched to branch 'remember-the-fifth-of-november' |
| (ns matasano.core | |
| (:require [clojure.tools.cli :as cli] | |
| [matasano.challenge-1 :as c1])) | |
| (def cli-options | |
| [["-c" "--challenge CHALLENGE" "Challenge number" | |
| :default 1 | |
| :parse-fn #(Integer/parseInt %)]]) | |
| (defn -main |
| var questions = [{ | |
| choices : [ | |
| { name : "Answer One" } | |
| { name : "Answer Two" } | |
| ] | |
| }, | |
| {}] | |
| $("#questionTmpl").render(questions) |
| require 'set' | |
| names = [ | |
| # student names here | |
| ] | |
| def get_group_set(coll) | |
| if coll.count % 4 == 0 | |
| coll.each_slice(4).to_a | |
| else | |
| [coll[0..2]] + get_group_set(coll[3..-1]) |