Skip to content

Instantly share code, notes, and snippets.

View jeremygibbs's full-sized avatar

Jeremy Gibbs jeremygibbs

View GitHub Profile
@jeremygibbs
jeremygibbs / apple.php
Last active January 12, 2016 03:48
Script to check Apple.com for Apple pencil in-store availability
<?php
############################################################
# script to check Apple for Apple Pencil availability #
# sku number: MK0C2AM/A #
# by: Jeremy A. Gibbs #
# https://gist.github.com/jeremygibbs/1d62544ee57dc4ee8633 #
############################################################
error_reporting(E_ALL);
ini_set('display_errors', 'On');
@jeremygibbs
jeremygibbs / bestbuy.php
Last active December 10, 2015 17:40
Script to check Best Buy for Apple Pencil availability
<?php
############################################################
# script to check Best Buy stock of Apple Pencil #
# sku number: 4538802 #
# you need a deverloper api key from Best Buy: #
# https://developer.bestbuy.com #
# by: Jeremy A. Gibbs #
# https://gist.github.com/jeremygibbs/1a6c248d12dda568d67d #
############################################################
error_reporting(E_ALL);
@jeremygibbs
jeremygibbs / auto_increment.sh
Created July 2, 2014 02:40
Shell script for the build phase that auto-increments an Xcode project's build number.
# Auto Increment Version Script
buildPlist=$INFOPLIST_FILE
echo $buildPlist
CFSVString=$(/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$buildPlist")
CFBundleVersion=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$buildPlist")
BUILD_NR=${CFBundleVersion##*.}
BUILD_NR=$(($BUILD_NR + 1))
LEN=$(echo ${#CFSVString})
if [ $LEN -eq 3 ]; then
CFBundleVersion=$CFSVString".0."$BUILD_NR
@jeremygibbs
jeremygibbs / fb_authorize.php
Created March 19, 2012 14:36
Obtain Long-Term Authorization Token From Facebook For Offline Posting
<?php
//-- Facebook API --//
//-- https://github.com/facebook/facebook-php-sdk --//
require_once 'facebook-php-sdk/src/facebook.php';
//-- App Information --//
$app_id = 'YOUR APP ID';
$app_secret = 'YOUR APP SECRET';
// Create Facebook Instance
@jeremygibbs
jeremygibbs / wp2sc.py
Created January 31, 2012 10:22 — forked from Reiot/wordpress2octopress.py
WordPress XML ==> Second Crack Markdown
#!/usr/bin/env python
#######################################################
# File: wp2sc.py #
# Date: 31 January 2011 #
# Auth: Jeremy A. Gibbs #
# Depn: Requires BeautifulSoup and html2text #
# Desc: This script reads in a Wordpress .xml export #
# file and converts the contents into markdown #
# formatted files suitable to import into #
# Marco Arment's Second Crack static blogging #