Skip to content

Instantly share code, notes, and snippets.

baron / 20130320_14231363757019_legal_system.utf
Created Mar 20, 2013
Thought Experiment on the American Legal System
View 20130320_14231363757019_legal_system.utf
baron / gist:1102664
Created Jul 24, 2011
Blogging engine for hackers for hackers
View gist:1102664
# engine goes here
baron / gist:971587
Created May 14, 2011
Improved Calibre Economist Recipe
View gist:971587
#!/usr/bin/env python
__license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at>'
from import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import BeautifulSoup
from calibre.ebooks.BeautifulSoup import Tag, NavigableString
View gist:969773
<a href="" class="hatena-bookmark-button" data-hatena-bookmark-title="designersforjapan" data-hatena-bookmark-layout="standard" title="このエントリーをはてなブックマークに追加"><img src="" alt="このエントリーをはてなブックマークに追加" width="20" height="20" style="border: none;" /></a><script type="text/javascript" src="" charset="utf-8" async="async"></script>
<iframe src="" scrolling="no" frameborder="0" marginwidth="0" marginheight="0" style="border:none; overflow:hidden; width:100px; height:20px;" allowTransparency="true"></iframe>
<iframe src=";;send=true&amp;layout=standard&amp;width=450&amp;show_faces=true&amp;action=like&amp;col
baron / magit
Created Mar 24, 2011
commit and push in one go
View magit
(defun magit-commit-then-push ()
View gist
(defun force-git-add-after-el-get (package-path)
(let* ((git-executable (el-get-executable-find "git"))
(name (format "*git add subdir %s*" package)) )
(message (format "cd %s && %s add %s/" el-get-dir git-executable package-path))
(shell-command (format "cd %s && %s add %s/" el-get-dir git-executable package-path))))
(add-hook 'el-get-post-install-hooks 'force-git-add-after-el-get)
(add-hook 'el-get-post-update-hooks 'force-git-add-after-el-get)
baron / gist:867129
Created Mar 12, 2011
Compiling Emacs 23 with Xcode 4
View gist:867129
#you need to do it from source
bzr branch emacs-23
cd emacs-23
./configure --with-ns --without-x
make bootstrap
make install
open nextstep/
baron / emacs-inline.patch
Created Mar 3, 2011
inline patch revised for cocoa emacs
View emacs-inline.patch
diff -p -N -r -x '*.elc' ../emacs-23.1.95/lisp/term/ns-win.el lisp/term/ns-win.el
*** ../emacs-23.1.95/lisp/term/ns-win.el 2010-03-11 11:20:29.000000000 +0900
--- lisp/term/ns-win.el 2010-04-03 21:49:10.000000000 +0900
*************** The properties returned may include `top
*** 315,320 ****
--- 315,321 ----
(cons (logior (lsh 0 16) 12) 'ns-new-frame)
(cons (logior (lsh 0 16) 13) 'ns-toggle-toolbar)
(cons (logior (lsh 0 16) 14) 'ns-show-prefs)
+ (cons (logior (lsh 0 16) 15) 'mac-change-input-method)
View init.el
(require 'google)
(defalias 'g 'google-code)
View init.el
(defun ib ()
"indent whole buffer"
(indent-region (point-min) (point-max) nil)
(untabify (point-min) (point-max)))
You can’t perform that action at this time.