Skip to content

Instantly share code, notes, and snippets.

@davidpfahler
davidpfahler / Grunt Coffee Task
Created February 13, 2012 21:20
A grunt task that compiles coffee-script to js
/*
* Grunt Task File
* ---------------
*
* Task: coffee
* Description: Compile coffee files to js
* Dependencies: coffee-script
*
*/
@davidpfahler
davidpfahler / hack.sh
Created April 1, 2012 13:45 — forked from boennemann/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2275387/hack.sh | sh
#
@davidpfahler
davidpfahler / fetch_finance_reports.rb
Created June 22, 2012 09:01 — forked from lukeredpath/fetch_finance_reports.rb
Fetch iTunes finance reports for your iPhone apps
#!/usr/bin/env ruby
require 'mechanize'
require 'open-uri'
require 'pathname'
require 'fileutils'
require 'pp'
### BEGIN CUSTOMIZATION
# set this to where you would like the reports to be stored
@davidpfahler
davidpfahler / itc.pl
Created June 22, 2012 20:24 — forked from ninjinkun/itc.pl
Itunes Connect Report Downloader
#!perl
use common::sense;
use HTTP::Request::Common;
use LWP::UserAgent;
use URI;
use Compress::Zlib;
use Perl6::Say;
my $uri = URI->new("https://reportingitc.apple.com/autoingestion.tft");
<?php
function podlove_camelcase_to_snakecase( $string ) {
return preg_replace( '/([a-z])([A-Z])/', '$1_$2', $string );
}
function podlove_camelsnakecase_to_camelcase( $string ) {
return str_replace( '_', '', $string );
}
@davidpfahler
davidpfahler / gist:3082309
Created July 10, 2012 09:36
These persons will vote on UBER AMENDMENT today
@marycheh
@cmmichaelabrown
@jimgrahamward1
@jackevansward2
@murielbowser
@kenyanmcduffie
@tommywells
@cmyma
@marionbarryjr
@cataniapress
@davidpfahler
davidpfahler / gist:3082322
Created July 10, 2012 09:39
Email template to write to DC Council regarding UBER AMENDMENT vote
subject: DC COUNCIL VOTES ON THE UBER AMENDMENT
Dear [Mr/Mrs X],
I would like to ask you to strike down the MINIMUM FARE language from the Uber Amendment. The minimum fare is an attack on start-ups and hinders innovation.  Please tell me what your position in this matter is. The question is: Are you in favor of innovators or incumbents?
Your name and response will be published in a blog of a 1,000,000 + readers.
If you’ll ignore this email, your name will be published as the
DC Council-member who chose to ignore my email.
Thank you for your fastest reply. 
@davidpfahler
davidpfahler / gist:3496388
Created August 28, 2012 09:06
iOS orientation change scale fix
(function(doc) {
var addEvent = 'addEventListener',
type = 'gesturestart',
qsa = 'querySelectorAll',
scales = [1, 1],
meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [],
fix = function() {
meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
doc.removeEventListener(type, fix, true);
};
@davidpfahler
davidpfahler / renderer.coffee
Created November 22, 2012 15:36
Renderer draft for Chaplin
define ["chaplin", "underscore"], (Chaplin, _) ->
mediator = Chaplin.mediator
class Renderer
constructor: ->
@initialize arguments...
# list of screens currently in DOM
screens: []
coffee:
modules:
files:
src: ["src/**/*.coffee"]
dest: '.'
expand: true
rename: (destBase, destPath) -> destBase + destPath.replace(/\.coffee$/, '.js')