Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jch on github.
  • I am jch (https://keybase.io/jch) on keybase.
  • I have a public key whose fingerprint is FAE8 17C4 6934 9DB4 8B49 FE0B 7374 4527 759B EE9C

To claim this, I am signing this object:

@jch
jch / messages-clean.md
Last active August 29, 2015 14:06
How to clean up your Mac Messages contact list
  • Delete Google Plus profile - stops the syncing of circles and friends
  • Revert to old Google Talk
  • Unlink Google account from System Preferences -> Internet Accounts
  • Clean up contacts in http://contacts.google.com
  • Open messages, select all, remove
  • Remove Messages related plists
  • Re-add Google account to Internet Accounts
  • Open Apple Contacts - this should now pull down a clean list of your contacts
  • Open Messages
  • Open GMail, from the chat, message the contacts you want to show up in Messages. This will send an invite to Messages that you can accept
  • Kabana Restaurant - 1106 University Ave. Berkeley, CA 94702
  • Taste of the Himalayas - 1700 Shattuck Ave.Ste. A Berkeley, CA 94709
  • Brazil Cafe - 1960 University Ave Berkeley, CA 94704
  • Arabica Restaurant Mediterranean Cuisine - 2115 Kittredge St Berkeley, CA 94704
  • Claremont Diner - 6200 Claremont Ave. Oakland, CA 94618
  • Miss Saigon Vietnamese Restaurant - 3345 Grand Ave. Oakland, CA 94610
  • Siam Orchid Thai Restaurant - 23-H Orinda Way Orinda, CA 94563
  • Holy Land Restaurant - 677 Rand Ave. Oakland, CA 94610
  • Lazeeza Pakistani & Indian Cruise - 10 Hegenberger Rd Oakland, CA 94621
  • Saroor Indian Cuisine - 2580 N. Main St. Walnut Creek, CA 94596
# Proposal for mapping responses back to requests for Net::LDAP.
require "fiber"
module Net
module LDAP
class Connection
# Hash of Responses keyed by message_id
attr_reader :responses
# Fake socket to read/write from
@jch
jch / jquery.setCurrentClassOnEvent.js
Created August 11, 2010 18:36
jquery.setCurrentClassOnEvent.js
// For a group of elements, sets 'className' on an element when 'evt'
// is triggered, and removes 'className' from all it's
// siblings. Useful for highlighting a selection within a list of
// choices.
//
// $('ul#my_list li').setCurrentClassOnEvent('click', 'current');
// <ul id="my_list">
// <li class="current">Chocolate</li> <!-- click adds 'current' class -->
// <li>Vanilla<li>
// <li>Strawberry</li>
@jch
jch / tail.rb
Created October 11, 2010 18:39
nspipe example
framework 'cocoa'
outpipe = NSPipe.pipe
task = NSTask.alloc.init
task.setLaunchPath '/usr/bin/tail'
task.setArguments %w(-f -n10 /Users/jch/projects/pharmmd/log/wendy.log)
task.setStandardOutput outpipe
file = outpipe.fileHandleForReading
@jch
jch / html5-navigations.html
Created December 14, 2010 05:00
sample navigations created with pure html5
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="reset-min.css" type="text/css" media="screen" title="no title" charset="utf-8">
<style type='text/css'>
html {
background-color: #cacaca;
}
.box {
@jch
jch / README.md
Created May 19, 2011 21:02
Rails Backup

Rails Backup

Add backup support to a Rails project with the 'backup' gem

Gemfile

gem 'backup', '3.0.15'
gem 'fog', '0.7.0'  # used by backup for s3 uploads, but not a dependency

Generate and Edit Config

Rubies to Prevent DevOps Mayhem

<iframe width="640" height="390" src="http://www.youtube.com/embed/vtP-S9OS0o0" frameborder="0" allowfullscreen></iframe>

You've just written a masterpiece of a web app. It's fun, it's viral, and it's useful. It's clearly going to be "Sliced Bread 2.0". But what comes next is a series of unforeseen headaches. You'll outgrow your shared hosting and need to get on cloud services. A late night hack session will leave you sleep deprived, and you'll accidentally drop your production database instead of your staging database. Once you serve up a handful of error pages, your

2006 500 sel
title - clean
#num owners
side airbags?
why selling - company car. maintained through the company.
last mechanic - front windshield. oil change. air filter.
get back at 5pm.