Skip to content

Instantly share code, notes, and snippets.

@mkb
mkb / gist:9436138
Created March 8, 2014 18:05
Example .gitignore
Gemfile.lock
tmp/*
db
config/api_keys.yml
.powrc
public/.sass-cache
@mkb
mkb / gist:9347f7ebf9c505193682
Created January 28, 2015 20:31
Console log extract following failed attempt to launch Buffer.app
1/28/15 12:25:46.658 PM secd[305]: securityd_xpc_dictionary_handler Buffer[84053] copy_matching The operation couldn’t be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements)
1/28/15 12:25:46.659 PM Buffer[84053]: SecOSStatusWith error:[-34018] The operation couldn’t be completed. (OSStatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements))
1/28/15 12:25:46.812 PM secd[305]: securityd_xpc_dictionary_handler Buffer[84053] copy_matching The operation couldn’t be completed. (OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements)
1/28/15 12:25:46.812 PM Buffer[84053]: SecOSStatusWith error:[-34018] The operation couldn’t be completed. (OSStatus error -34018 - Remote error : The operation couldn‚Äôt be completed. (OSStatus error -34018 - client has neither application-i
@mkb
mkb / gist:4b67b81b3b0b8c1a09c9
Created September 2, 2015 22:30
Keybase.io verification
### Keybase proof
I hereby claim:
* I am mkb on github.
* I am mkb (https://keybase.io/mkb) on keybase.
* I have a public key whose fingerprint is 2A45 4DA9 FE55 E538 B033 976A EC78 7B72 78A6 7550
To claim this, I am signing this object:
@mkb
mkb / gist:1040784
Created June 22, 2011 18:43
Prevent infinite loop in Autotest by ignoring volatile files
Autotest.add_hook :initialize do |at|
# Prevent infinite loops by ignoring volatile files
%w{.git vendordb log tmp .DS_store Gemfile.lock}.each do |exception|
at.add_exception(exception)
end
end
@mkb
mkb / gist:1101986
Created July 23, 2011 23:09
Apps I need Lion-friendly before I can upgrade:

Do not pass go, do not collect $30

  • TextMate
  • OmniFocus
  • Quicksilver
  • 1Password
  • Colloquy
  • Dropbox
  • Evernote
  • GitX (preferably the fork)
@mkb
mkb / gist:1119690
Created August 2, 2011 06:27
Using an unreleased gem version with Bundler

TL;DR

Do this:

gem 'nokogiri'
gem 'w3c_validators', "1.1.1", :git => 'git://github.com/alexdunae/w3c_validators.git'

Why?

After experiencing trouble with the w3c_validators gem, I discovered that the problem was a known bug. A fix has been committed, but not yet released in gem form. I could have gone with an older version of the gem, but instead tweaked my Gemfile (ie, Bundler) to use the latest and greatest code.

@mkb
mkb / end.scpt
Created August 2, 2011 06:58
Colloquy away/back scripts for Pomodoro.app
tell application "System Events" to if exists process "Colloquy" then
tell application "Colloquy"
set aC to every connection
repeat with c in aC
set aR to (every chat room of c)
repeat with r in aR
set away message of c to ""
end repeat
end repeat
end tell
@mkb
mkb / gist:1218376
Created September 15, 2011 02:31
#!/usr/bin/env ruby -wKU
LOG = 'eventcmd.log'
event = ARGV.first
@message = 'Gug.'
def ichat_message
%Q{set status message to "#{@message}"}
end
mkb@chongo ~ % rvm install 1.8.7
Installing Ruby from source to: /Users/mkb/.rvm/rubies/ruby-1.8.7-p352, this may take a while depending on your cpu(s)...
ruby-1.8.7-p352 - #fetching
ruby-1.8.7-p352 - #extracting ruby-1.8.7-p352 to /Users/mkb/.rvm/src/ruby-1.8.7-p352
mv: rename /Users/mkb/.rvm/tmp/rvm_src_59540/\033[34mruby-1.8.7-p352\033[39;49m\033[0m to /Users/mkb/.rvm/src/ruby-1.8.7-p352: No such file or directory
ruby-1.8.7-p352 - #extracted to /Users/mkb/.rvm/src/ruby-1.8.7-p352
/Users/mkb/.rvm/scripts/functions/manage/base: line 163: cd: /Users/mkb/.rvm/src/ruby-1.8.7-p352: No such file or directory
ERROR: Source directory is missing.
Did the download or extraction fail?
ActiveSupport::Notifications.instrument("cheezburger", :extra => :information) do
# Do stuff.
end