Skip to content

Instantly share code, notes, and snippets.

View jdavis's full-sized avatar
💾

Josh Davis jdavis

💾
View GitHub Profile
Provides: {'do_something': <function do_something at 0x102f217d0>, 'do_something_else': <function strange_function_name at 0x102f2b8c0>}
Keybindings: {'t[2, 1]': <function command_t at 0x102f2b9b0>}
do something
doing something else 1337
@jdavis
jdavis / puzzle.py
Created March 31, 2015 20:43
Python Functional Puzzle
def cons(x, y):
return lambda f: f(x, y)
def car(x):
# Fill out this function
pass
if car(cons(1, 5)) == 1:
print 'Solved!'
else:
# Rename a file and keep it in the same location
rename() {
if [ "$#" -ne 2 ]; then
echo "usage: $0 path/to/file/old_name new_name"
return
fi
mv $1 `dirname $1`/$2
}