Skip to content

Instantly share code, notes, and snippets.

View jimeh's full-sized avatar

Jim Myhrberg jimeh

View GitHub Profile
@jimeh
jimeh / iced.coffee
Last active December 15, 2015 20:19
Ice Coffee Script vs Promises/A (as I've understood it at least)
search = (keyword, callback) ->
host = "http://search.twitter.com/"
url = "#{host}/search.json?q=#{keyword}&callback=?"
await $.getJSON(url, defer(json))
callback json.results
search "hello world", (results) -> console.log(results)
@jimeh
jimeh / warrant of arrest.txt
Created July 26, 2012 21:16
Random and funny span email attachment
Anti-Terrorist and Monetary Crimes Division
FBI Headquarters In Washington, D.C.
Federal Bureau Of Investigation
J. Edgar Hoover Building
935 Pennsylvania Avenue, NW Washington, D.C. 20535-0001
@jimeh
jimeh / 0-readme.md
Created July 21, 2012 02:37 — forked from titanous/0-readme.md
Ruby 1.9.3-p0 with ruby-debug19

Ruby 1.9.3-p0 with ruby-debug19

Ruby 1.9.3-p0 requires a minor patch to make ruby-debug19 work. If you have ruby-build and rbenv installed, these scripts will install ruby-1.9.3-p0.

curl https://raw.github.com/gist/1270704/install-ruby-1.9.3-p0.sh | sh
# Taken from Homebrew Emacs formula on 4-Jun-2012: http://bit.ly/LscRSk
#
# The following are the descriptions from the formula for this patch:
#
# - Fix for building with Xcode 4; harmless on Xcode 3.x.
# - Fix for the titlebar issue on Mac OS X 10.7
#
diff --git a/src/nsterm.m b/src/nsterm.m
index 30b73c2..234b8b5 100644
--- a/src/nsterm.m
@jimeh
jimeh / DefaultKeyBinding.dict
Created January 9, 2012 15:44
More Emacs-friendly keybindings in Cocoa Apps.
/* ~/Library/KeyBindings/DefaultKeyBinding.dict */
{
/* Additional Emacs bindings */
"~f" = "moveWordForward:"; /* M-f */
"~b" = "moveWordBackward:"; /* M-b */
"~<" = "moveToBeginningOfDocument:"; /* M-< */
"~>" = "moveToEndOfDocument:"; /* M-> */
"~v" = "pageUp:"; /* M-v */
"^v" = "pageDown:"; /* C-v */
@jimeh
jimeh / .tmux.conf
Created January 5, 2012 14:40
My Tmux configuration
# Prefix Key
unbind C-b
set -g prefix C-q
# Settings
set -g default-terminal "screen-256color" # emacsclient speedboost
set -g mode-mouse on
set -g mouse-select-pane on
set -g mouse-resize-pane on
set -g mouse-select-window on
@jimeh
jimeh / Tango with Monokai.itermcolors
Created January 1, 2012 23:54
A iTerm color theme blending Tango Dark with Monokai.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.0</real>
<key>Green Component</key>
<real>0.0</real>
require 'formula'
class TmuxForIterm2 < Formula
url 'http://iterm2.googlecode.com/files/tmux-for-iTerm2-20120108.tar.gz'
md5 'f15d9f567b9b029482bb7b3227ee7ac3'
homepage 'http://code.google.com/p/iterm2/wiki/TmuxIntegration'
depends_on 'libevent'
def install
@jimeh
jimeh / emacs24-osx-srgb.diff
Created November 13, 2011 10:04
sRGB color patch for Emacs 24 on Mac OS X. More info: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8402
diff --git a/src/nsterm.m b/src/nsterm.m
index af1f21a..696dbdc 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1389,7 +1389,7 @@ ns_get_color (const char *name, NSColor **col)
if (r >= 0.0)
{
- *col = [NSColor colorWithCalibratedRed: r green: g blue: b alpha: 1.0];
+ *col = [NSColor colorWithDeviceRed: r green: g blue: b alpha: 1.0];
@jimeh
jimeh / __readme.md
Created September 6, 2011 14:44
Let's not localize programming languages. Please >_<

Let's not localize programming languages. Please >_<

Feel free to fork and expand and/or add more languages as an example to why this would be horrible, and I'll add them here :)