Skip to content

Instantly share code, notes, and snippets.

View jeremyckahn's full-sized avatar

Jeremy Kahn jeremyckahn

View GitHub Profile
@jeremyckahn
jeremyckahn / propagateKapi.sh
Created March 21, 2011 01:54
I use this when pushing a stable release from dev.
git checkout master;
git merge dev;
git checkout gh-pages;
git merge dev;
git push origin dev;
git push origin master;
git push origin gh-pages;
git checkout dev;
@jeremyckahn
jeremyckahn / gist:948381
Created April 29, 2011 14:30
seawolff kapi fix
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>kapi</title>
<meta name="generator" content="TextMate http://macromates.com/">
<meta name="author" content="Jeremy Kahn">
<!-- Date: 2010-12-07 -->
@jeremyckahn
jeremyckahn / tweeny.md
Created May 19, 2011 13:47
A rough, incomplete README

Tweeny

Tweeny is a tweening engine for JavaScript. That's it. Tweeny is meant to be a low level tool that can be encapsulated by higher-level tools. It does:

  • Tweening.
  • Extensibility hooks for the tweening.

Tweeny doesn't do:

@jeremyckahn
jeremyckahn / osx.sh
Created June 6, 2011 01:46
Useful OS X BASH commands
# Disable Spaces animation
# /via http://hints.macworld.com/article.php?story=20110214074550501
defaults write com.apple.dock workspaces-swoosh-animation-off -bool YES && killall Dock
# ... And re-enable.
defaults delete com.apple.dock workspaces-swoosh-animation-off && killall Dock
@jeremyckahn
jeremyckahn / .vimrc
Created September 8, 2011 06:10
.vimrc
syntax enable
set number
set hlsearch
set incsearch
set nocp
set autoindent
set expandtab
set shiftwidth=4
set softtabstop=4
cnoreabbr nt NERDTree
@tdreyno
tdreyno / equivs.txt
Created September 12, 2011 00:51 — forked from jeremyckahn/equivs.txt
Equivalent JS and CoffeeScript functions?
getSpeedySignature: (ofString) ->
sum = 0
for i in [0..ofString.length]
sum += ofString.charCodeAt(i)
sum

I click a link in Facebook or Twitter, I don't care about the URL. I care about content.

Sure, that link points to a URL, but I don't know what it is, and I'll never remember it. It could even be a really sensible URL, like http://odopod.com/blog/hack-days-2011-coming-november/ — but I still won't remember it. URLs are implementation details for content on the web, not content in themselves.

People want to share. They're probably doing it with Facebook or Twitter. Being able to share a link to content isn't dependent on a native or non-native experience, it's neutral. Even if your native app had a URL bar, you wouldn't want to copy and paste that into a thing and send that thing to someone, you want to press share and press a person.

Look, I love web apps — I even build one for a living! But users consistently appreciate native apps on iPhone (this doesn't apply to Android) because of the constraints of the HIG and the SDK.

@blake8086
blake8086 / twitter.js
Created November 17, 2011 23:13
Simple node.js server to stream Twitter 'Spritzer' level stream to client browser
global.server = require('http').createServer(function(request, response) {
global.twitterFeed = require('https').get({
auth: 'username:password',
host: 'stream.twitter.com',
path: '/1/statuses/sample.json',
}, function(res) {
res.setEncoding('utf8');
response.writeHead(200, 'text/plain');
res.on('data', function(chunk) {
response.write(chunk);
@madrobby
madrobby / webkitRequestAnimationFrame.html
Created April 5, 2012 06:40 — forked from jeremyckahn/webkitRequestAnimationFrame.html
An example of requestAnimationFrame (webkit version)
<b id=a>X<script>e=document.getElementById('a'),i=0;(function u(){e.style.marginLeft=++i+'px';webkitRequestAnimationFrame(u)})()</script>​