This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
;; emacsd-tile.el -- tiling windows for emacs | |
(defun swap-with (dir) | |
(interactive) | |
(let ((other-window (windmove-find-other-window dir))) | |
(when other-window | |
(let* ((this-window (selected-window)) | |
(this-buffer (window-buffer this-window)) | |
(other-buffer (window-buffer other-window)) | |
(this-start (window-start this-window)) |
#!/bin/sh | |
# | |
# A git hook script to find and fix trailing whitespace | |
# in your commits. Bypass it with the --no-verify option | |
# to git-commit | |
# Ref - http://is.gd/PerowD | |
# | |
if git rev-parse --verify HEAD >/dev/null 2>&1 | |
then |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
function killport { | |
if [ $1 == '-h' ] || [ -z $1 ]; then | |
echo '`killport <PORT>` finds the process listening to the specified port and kills it.' | |
else | |
process_line=`sudo lsof -i :$1 | tail -1` | |
if [ "$process_line" == "" ]; then | |
echo "no processes listening on $1" | |
else | |
process_name=`echo "$process_line" | awk '{print $1}'` | |
echo "killing $process_name" |
(global-set-key (kbd "C-c C-r") 'run-mocha) | |
(defun run-mocha() | |
"Runs all the tests in the current buffer" | |
(interactive) | |
(let* (command result exit-value) | |
(setq command (concat "mocha -r should " (buffer-name))) | |
(setq exit-value (shell-command command)) | |
(color-modeline exit-value))) |
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
<!doctype html> | |
<html> | |
<head> | |
<title>iFrame memory leak prevention test</title> | |
</head> | |
<body> | |
<h1>iFrame memory leak prevention test (void)</h1> | |
<p>In IE up through version 8 adding an iframe to a page and | |
removing it produces a memory leak in some cases. The pattern |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
/* Flatten das boostrap */ | |
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid { | |
-moz-box-shadow: none !important; | |
-webkit-box-shadow: none !important; | |
box-shadow: none !important; | |
-webkit-border-radius: 0px !important; | |
-moz-border-radius: 0px !important; | |
border-radius: 0px !important; | |
border-collapse: collapse !important; | |
background-image: none !important; |