Skip to content

Instantly share code, notes, and snippets.

View atomkirk's full-sized avatar

Adam Kirk atomkirk

View GitHub Profile
atomkirk /
Last active August 29, 2015 13:56
My Favorite Git Commands

Git with your host, Adam Kirk


I do not claim to be smart at all, but I've worked with very smart people and they have taught me about git and how it works at a fundamental level, so I feel at this point qualified to offer some of the stuff I've learned as best practices. So her'goes.

Fetch All

When you pull, you sometimes don't know what you're pulling. It can be helpful to use git fetch --all and compare what's on your remotes with git diff origin/master to see what's different.

more to come…


POST /companies/:company_token/interactions


{ "interaction":
    "channel": "chat",

"body": "blah",

atomkirk /
Last active August 29, 2015 14:02
rob git cheatsheet


  • git clone --recursive <repo> <the-name-you-want-for-repo-directory>

Set up production remote

  • git remote add production <production-repo-url>


  • git add . -A
  • git commit -am 'message'
  • git pull -r origin master
atomkirk / gist:6d1a38a1636f7faa70de
Last active August 29, 2015 14:03
The Ecstasy and Disappointment of App Store Rankings

In 2010, Rob Foster and I released our first app, Calvetica, to the app store. It was one of the first two or three, if not the first, third-party calendar apps to use the new Event Kit that was released with iOS 4. The first day we sold around 20 copies, which wasn't bad I guess, but we're pie-in-the-sky dreamers, so we were a little disappointed. The next day, I woke to see we had sold 700 copies, and it got better and stayed that way for a while. It was the most excitement I'd felt since Christmas as a kid, watching our app climb the app store rankings. We made a lot of money.

Then, to our confusion and great disappointment, the rankings started to slip. Then, John Gruber linked to it on Daring Fireball and we sold about 2000 a day for a while and go to the #2 spot in productively and the #50 spot in the whole App Store. Thank you John! But, that was also just a spike. We began to watch our app sink again and wondered if and when it would stop. I bet if any app developers are reading this, they are shakin

Keybase proof

I hereby claim:

  • I am atomkirk on github.
  • I am atomkirk ( on keybase.
  • I have a public key whose fingerprint is 1C0B BAC4 856C 3A57 29B0 6A25 659B F134 DCD3 F86E

To claim this, I am signing this object:

atomkirk / pre-commit_audit
Created December 8, 2014 15:36
Pre-commit to audit source for personal code/log statements.
echo "Checking host URL…"
e=$(egrep -r '^\s+?host:.*?localhost:3000.*?$' . 2>/dev/null)
if [ -n "$e" ]; then
echo "You need to change host to heroku."
exit 1
atomkirk / javascript-isEqual.js
Last active August 29, 2015 14:11
unordered javascript object isEqual
// compares two objects deeply ignoring array ordering.
isEqual = function(a, b) {
objectMap = function(obj) {
var map = [];
var queue = [{ key: '', value: obj }];
while (queue.length > 0) {
var current = queue.shift();
var key = current.key;
atomkirk / main.c
Created January 22, 2015 03:51
Simple C Web Server
/* A simple server in the internet domain using TCP
The port number is passed as an argument */
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
atomkirk / PassInError.swift
Last active August 29, 2015 14:22
Pass In Error
// PassInError.swift
// Created by Adam Kirk on 6/6/15.
import Foundation
typealias PassInErrorBlock = (error: NSError) -> Void
class PassInError: NSObject {
dynamic var ref: NSError?