Skip to content

Instantly share code, notes, and snippets.

View cbilson's full-sized avatar

Chris Bilson cbilson

View GitHub Profile
@cbilson
cbilson / gist:7601239
Last active December 29, 2015 02:29 — forked from halgari/gist:7002344
(defun nrepl-eval-expression-at-point-in-repl ()
(interactive)
(let ((form (nrepl-expression-at-point)))
;; Strip excess whitespace
(while (string-match "\\`\s+\\|\n+\\'" form)
(setq form (replace-match "" t t form)))
(set-buffer (cider-current-repl-buffer))
(goto-char (point-max))
(insert form)
(nrepl-return)))
(defun nrepl-eval-expression-at-point-in-repl ()
(interactive)
(let ((form (nrepl-expression-at-point)))
;; Strip excess whitespace
(while (string-match "\\`\s+\\|\n+\\'" form)
(setq form (replace-match "" t t form)))
(set-buffer "*nrepl*")
(goto-char (point-max))
(insert form)
(nrepl-return)))
@cbilson
cbilson / infoq.sh
Last active December 27, 2015 07:59 — forked from shirishp/infoq.sh
#! /bin/bash
# Original Author: Shirish Padalkar (https://twitter.com/_Garbage_)
if [ "$#" -ne 1 ]; then
echo "Usage: $0 infoq_presentation_url"
exit 1
fi
url_with_spaces=`curl -silent -A "Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10" $1 | grep "<source src=" | tr -dc "[:print:]"`
@cbilson
cbilson / hack.sh
Created April 5, 2012 09:51 — forked from makevoid/hack.sh
OSX For Hackers
#!/usr/bin/env sh
echo "Use current directory as default search scope in Finder"
defaults write com.apple.finder FXDefaultSearchScope -string "SCcf"
echo "Show Path bar in Finder"
defaults write com.apple.finder ShowPathbar -bool true
echo "Disable the Ping sidebar in iTunes"
defaults write com.apple.iTunes disablePingSidebar -bool true