Skip to content

Instantly share code, notes, and snippets.

David Jacobs djacobs

Block or report user

Report or block djacobs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@djacobs
djacobs / automatedBuildAndUploadToTestflight.sh
Created Apr 18, 2012 — forked from amattn/automatedBuildAndUploadToTestflight.sh
Automated Xcode build and upload to TestFlight.
View automatedBuildAndUploadToTestflight.sh
#!/bin/sh
# Current as working as of 2012/4/17
# Xcode 4.3.2
PROJECT_ROOT="$HOME/SomeDirWhereYourProjectLives/XXXXXXXX"
WORKSPACE="$PROJECT_ROOT/XXXXXXXX.xcodeproj/project.xcworkspace"
CONFIG="AdHoc"
SCHEME="XXXXXXXX"
View propubnerd-gists.md

Open Source code doesn’t always come in big complex packages. At ProPublica we sometimes share small, simple snippets of using GitHub "Gists." These Gists range from single-byte file delimiters to an entire JavaScript framework for making stepper graphics. They rarely have documentation and don’t even always have names, but they can be super-useful. Here are some we’ve shared over the past few years:

View simpledomready.js
function domReady(callback) {
var domLoaded;
var called;
var onReadyStateChange = function () {
if (document.readyState == 'complete') {
domLoaded();
}
};
View ThinkUp on EC2 Ubuntu 10.10 User-Data Script
#!/bin/bash -ex
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
# install ThinkUp on EC2 Ubuntu instance:
#
# @spara 12/23/10
# @waxpancake 1/3/11
# install required packages
sudo apt-get update
View copy_and_paste.py
# credit: http://news.ycombinator.com/item?id=1543915
# in ipythonrc:
# execfile copy_and_paste.py
def copy(data):
from subprocess import Popen, PIPE
Popen(["xclip", "-selection", "clipboard"], stdin=PIPE).communicate(str(data))
def paste():
View gist:413207
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Activity widget</title>
<style type="text/css">
body { font-family: Helvetica; font-size: 12px; }
#note-list li { list-style: none; margin-bottom: 5px; padding-bottom: 5px; border-bottom: 1px dotted #999; }
#note-list li span.avatar { padding-right: 10px; }
View gist:383542
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Activity widget</title>
</head>
<body>
<ul id="note-list"></ul>
View clients.md

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

View typepad_external_asset_lookup.php
<html>
<body>
<h3>External Assets Example</h3>
<?php
/***** Utility methods + constants ******/
define ("DEFAULT_DEBUG_MODE", 1);
define ("ROOT_TYPEPAD_API_URL", "http://api.typepad.com");
View gist:352564
#!/usr/bin/perl -w
use strict;
use IO::Prompt;
use Try::Tiny;
use WWW::TypePad;
use WWW::TypePad::CmdLine;
my $tp = WWW::TypePad::CmdLine->initialize( requires_auth => 1 );
You can’t perform that action at this time.