Skip to content

Instantly share code, notes, and snippets.


Jim Myhrberg jimeh

View GitHub Profile
View domain-finder.go
package main
import (
View github-dark-diff-color-customizer.css
/* ==UserStyle==
@name GitHub Dark Diff Color Customizer (customized)
@namespace StylishThemes
@version 2.0.4-custom
@description A diff color customization style, colorblind friendly by default
@author StylishThemes and contributors
@license MIT

RSpec Hook Order

The following is a quick reference to exact order of hook execution in RSpec. The output from hook_spec.rb is:

describe: "a thing"
  -> before: all (top)
    -> around: before (top)
      -> before: each (top)
        -> example: "success" (top)
jimeh / bluetooth_sleep.lua
Created Jan 29, 2019 — 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`).
View bluetooth_sleep.lua
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)
function f(event)
jimeh / .rubocop.yml
Last active Sep 18, 2017
Error in Rubocop 0.50.0's Style/SafeNavigation cop
View .rubocop.yml
TargetRubyVersion: 2.4
# Let hubot chime in on certain discussions...
module.exports = (robot) ->
robot.hear /rewrite/i, (msg) ->
if shouldSpeak(0.1)
robot.hear /refactor/i, (msg) ->
if shouldSpeak(0.1)
jimeh / tmux.rb
Created May 13, 2016
Seemingly working Homebrew formula for Tmux 2.2.
View tmux.rb
class Tmux < Formula
desc "Terminal multiplexer"
homepage ""
stable do
url ""
sha256 "bc28541b64f99929fe8e3ae7a02291263f3c97730781201824c0f05d7c8e19e4"
head do
jimeh / chat.go
Created Sep 28, 2015
simple golang chat server
View chat.go
package main
import (
type Client struct {
incoming chan string
outgoing chan string
jimeh / code.rb
Last active Aug 29, 2015
Weird Ruby variable assignment behavior
View code.rb
puts defined?(hello).inspect # => nil
puts "this will not print #{hello.inspect}" rescue nil
hello = 'dude' if false
puts defined?(hello).inspect # => "local-variable"
puts hello.inspect # => nil
# Outputs:
# nil
# "local-variable"

Keybase proof

I hereby claim:

  • I am jimeh on github.
  • I am jimeh ( on keybase.
  • I have a public key whose fingerprint is F0FD DA8B 81F8 3800 1ADF E59E B85A 9E6D 6BBB 670E

To claim this, I am signing this object: