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
(def mm {1 {101 :a 102 :b 103 :c} 2 {201 :aa 202 :bb}}) | |
;; possible cases | |
;; fully populated {1 {11 :a, 12 :b}, 2 {21 :a, 22 :b}} | |
;; single inner value {1 {12 :b}, 2 {21 :a, 22 b}} | |
;; empty inner value, multi-entry outer {1 {}, 2 {21 :a, 22 :b}} | |
;; other degenerate cases that boil down to either "the first key-value pair has data to process" or "We're done." | |
(defn outer-inners |
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
rsync -azP --delete --exclude-from=.gitignore <src> <dest> |
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 | |
alias reload="source ~/.bashrc" | |
# source the sublimerc file if it exists | |
if [ -f "${HOME}/.sublimerc" ] ; then | |
source "${HOME}/.sublimerc" | |
fi | |
src() |
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
defmodule MyList do | |
def mymax([h | t]), do: mymax(h, t) | |
def mymax(v, []), do: v | |
def mymax(v, [h | t]) when h < v, do: mymax(v, t) | |
def mymax(_v, [h | t]), do: mymax(h, t) |
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
Erlang R16B01 (erts-5.10.2) [source-bdf5300] [async-threads:10] [hipe] [kernel-poll:false] | |
Interactive Elixir (0.10.1-dev) - press Ctrl+C to exit (type h() ENTER for help) | |
iex(1)> 1 + 3 | |
4 | |
... | |
iex(5)> a = "foo" | |
"foo" | |
iex(6)> 8 + a | |
** (ArithmeticError) bad argument in arithmetic expression |
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
;; ... | |
(defn- lock [handler] | |
(friend/requires-scheme handler :https {:http 3333 | |
:https 3334})) | |
(defroutes sensitive-routes | |
(GET "/register" [] | |
(layout/render "auth/register.html")) | |
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
upstream http_backend { | |
server localhost:33333; | |
keepalive 32; | |
} | |
server { | |
listen 3333 default_server; | |
server_name localhost; |
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
(ns share-for-all.routes.auth | |
;; ... | |
(:require ;; ... | |
[cemerick.friend :as friend] | |
(cemerick.friend [workflows :as workflows] | |
[credentials :as creds]))) | |
;; ... | |
(defroutes secured-routes | |
(GET "/register" req |
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
#!/Users/mnutter/.rvm/rubies/ruby-2.0.0-p247/bin/ruby | |
def toCamel(s) | |
while s =~ /([^_]+)_(.)(.*)$/ do | |
s = $1 + $2.upcase + $3 | |
end | |
return s | |
end | |
def toSnake(s) |
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
[Desktop Entry] | |
Version=1.0 | |
Type=Application | |
Terminal=false | |
Name=Sublime Text 2 | |
GenericName=Text Editor | |
Comment=View and edit files | |
Exec=/home/mark/SublimeText2/sublime_text %F | |
Icon=/home/mark/SublimeText2/Icon/128x128/sublime_text.png | |
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;text/x-clj;text/x-cljs |
NewerOlder