So here's one way to think about routes:
-- retrieving data about a contact or contacts
# index GET /contacts Contact.all
# show GET /contacts/1 Contact.find(1)
-- helping you create a new contact| (def encode | |
| [reflector rotor-l rotor-m rotor-r letter] | |
| (->> (letter-to-index letter) | |
| (rotor-translate-left (rotate rotor-r 1)) | |
| (rotor-translate-left rotor-m) | |
| (rotor-translate-left rotor-l) | |
| (reflect reflector) | |
| (rotor-translate-right rotor-l) | |
| (rotor-translate-right rotor-m) | |
| (rotor-translate-right (rotate rotor-r 1) |
| " Toggle comments as invisible | |
| nmap <Leader>Ci :hi! link Comment Ignore<CR> | |
| nmap <Leader>Cc :hi! link Comment Comment<CR> |
| 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]) |
| var questions = [{ | |
| choices : [ | |
| { name : "Answer One" } | |
| { name : "Answer Two" } | |
| ] | |
| }, | |
| {}] | |
| $("#questionTmpl").render(questions) |
| (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 |
| 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' |