Skip to content

Instantly share code, notes, and snippets.

@brianpartridge
brianpartridge / Pool Schedule.py
Created December 23, 2012 22:27
Pool Schedule
import sys, os
import webbrowser
from bs4 import BeautifulSoup
import urllib
### Config
URL = 'http://www.brooklinema.gov/index.php?option=com_content&view=article&id=208&Itemid=783'
### Functions
@brianpartridge
brianpartridge / Remote SSH To Anubis.py
Created December 20, 2012 04:47
Remote SSH To Anubis
import json
from dropbox import client, rest, session
import webbrowser
import keychain
import sys
import os
### Config
config = json.load(open('config.json', 'r'))
@brianpartridge
brianpartridge / Dropbox - Unlink.py
Created December 20, 2012 04:45
Dropbox - Unlink
@brianpartridge
brianpartridge / Dropbox - Connect.py
Created December 20, 2012 04:44
Dropbox - Connect
import json
from dropbox import client, rest, session
import webbrowser
import keychain
import sys
import os
### Config
config = json.load(open('config.json', 'r'))
@brianpartridge
brianpartridge / Common Config - View.py
Created December 20, 2012 04:43
Common Config - View
import json
import os, sys
path, script = os.path.split(sys.argv[0])
name, ext = os.path.splitext(script)
print "### %s ### " % name
config = json.load(open('config.json', 'r'))
print "Common configuration settings:"
@brianpartridge
brianpartridge / Create iOS Icons.jsx
Created September 23, 2012 00:20 — forked from twonjosh/Create iOS Icons.jsx
Photoshop Script to Create iOS Icons from a source image
// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@brianpartridge
brianpartridge / gist:2406408
Created April 17, 2012 14:40
Bookmarklet to email a link to the current page.
// javascript:javascript:%20function%20emailURL()%20{var%20r%20=%20%22you@example.com%22;var%20d%20=%20document;var%20x%20=%20%22mailto:%22%20+%20r%20+%20%22?subject=%22%20+%20d.title%20+%20%22&body=%22%20+%20d.location;window.location.href%20=%20x;}emailURL();void(0)
javascript: function emailURL() {
var r = "you@example.com";
var d = document;
var x = "mailto:" + r + "?subject=" + d.title + "&body=" + d.location;
window.location.href = x;
}
emailURL();
void(0)
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
// Set the font and text based on the index path