Skip to content

Instantly share code, notes, and snippets.

View rodericj's full-sized avatar
🐔
chicken

Roderic Campbell rodericj

🐔
chicken
View GitHub Profile
@senning
senning / US Zip Codes from 2016 Government Data
Last active May 11, 2020 20:43 — forked from erichurst/US Zip Codes from 2013 Government Data
All US zip codes with their corresponding latitude and longitude coordinates.Comma delimited for your database goodness.Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
00622,17.991245, -67.153993
@brennanMKE
brennanMKE / buildnumber.sh
Created September 20, 2014 01:06
Automatically updating the build number in Xcode
appBuild=`date "+%Y.%m.%d.%H%M%S"`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $appBuild" "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
echo "Updated ${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"

This is an adaptation of https://twitter.com/jasonneylon script.

In the terminal window, you can open your current repo (at the current branch) in your default browser.

My adaptation was adding options to view the commits, branches, pull requests or issues for the repo using one of the additional options (added support for wiki, settings, pulse, graphs, network):

[-h]  => View help
[-c]  => View commits
[-b]  => View branches
[-pr] => View pull requests
@ShadoFlameX
ShadoFlameX / custom_callouts.md
Last active May 20, 2018 14:14
Custom Map Annotation Callouts on iOS
  1. Create a UIView subclass for the pin callout view.
  2. Create a subclass of MKAnnotationView for your map pins.
  3. Add an instance of the callout view subclass to your MKAnnotationView subclass.
  4. Add a property to toggle the callout view to your MKAnnotationView subclass. This example fades in/out:
    - (void)setShowCustomCallout:(BOOL)showCustomCallout
    {
        [self setShowCustomCallout:showCustomCallout animated:NO];
    }
    
@megawertz
megawertz / freshbooksUnbilledStats.js
Last active January 12, 2016 18:59
Gets unbilled hours from Freshbooks and formats them into a CSV for Panic's Status Board app. This only shows unbilled totals per project. It suits my needs but yours will probably differ.
// Get unbilled hours from Freshbooks and show them in Panic's Status Board
// This assumes A LOT and is built for my usage. YMMV.
var sys = require('sys');
var fs = require('fs');
var exec = require('child_process').exec;
var parseString = require('xml2js').parseString;
var projListChild, timeEntryListChild;
@0sn
0sn / build_rt.py
Created April 15, 2013 16:59
A python script to turn rescuetime data into something that Panic's StatusBoard app understands
#/usr/local/bin/python
"""Build Rescuetime Graph Data for StatusBoard.app
This script pulls data from a rescuetime account and flattens it into a format
that is easily read by StatusBoard. Okay. Run it with cron or launchd, whatever.
*nick wolfe
http://nameremoved.com/
"""
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@Abizern
Abizern / uuidgen.m
Created December 20, 2011 11:51
A method that returns a UUID in an ARC environment.
- (NSString *)uuidString {
// Returns a UUID
CFUUIDRef uuid = CFUUIDCreate(kCFAllocatorDefault);
NSString *uuidStr = (__bridge_transfer NSString *)CFUUIDCreateString(kCFAllocatorDefault, uuid);
CFRelease(uuid);
return uuidStr;
}