Skip to content

Instantly share code, notes, and snippets.

View jimeh's full-sized avatar

Jim Myhrberg jimeh

View GitHub Profile
@jimeh
jimeh / bluetooth_sleep.lua
Created January 29, 2019 01:16 — forked from ysimonson/bluetooth_sleep.lua
Hammerspoon script to disable bluetooth when the computer is put to sleep. Requires `blueutil` to be installed (`brew install blueutil`).
function bluetooth(power)
print("Setting bluetooth to " .. power)
result = hs.execute("blueutil --power " .. power)
if result.rc ~= 0 then
print("Unexpected result executing `blueutil`: rc=" .. result.rc .. " type=" .. result.type .. " output=" .. result.output)
end
end
function f(event)
@jimeh
jimeh / chat.go
Created September 28, 2015 08:56
simple golang chat server
package main
import (
"bufio"
"net"
)
type Client struct {
incoming chan string
outgoing chan string
@jimeh
jimeh / emacs-osx-srgb.patch
Last active December 25, 2015 01:58 — forked from purcell/emacs-osx-srgb.patch
Adjusted for Emacs 24.3 source specifically
diff --git a/src/nsterm.m b/src/nsterm.m
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -1401,7 +1401,7 @@ ns_get_color (const char *name, NSColor
if (r >= 0.0)
{
- *col = [NSColor colorWithCalibratedRed: r green: g blue: b alpha: 1.0];
+ *col = [NSColor colorWithSRGBRed: r green: g blue: b alpha: 1.0];
UNBLOCK_INPUT;
@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
@jimeh
jimeh / Git SVN workflow.sh
Created January 22, 2010 11:43 — forked from anildigital/Git SVN workflow.sh
Git SVN Workflow
# >> First workflow
git svn clone <svn_repo>
git checkout -b featureZ
# hack hack hack
git commit -a
git svn rebase
git svn dcommit # you can add -e to enter new