Skip to content

Instantly share code, notes, and snippets.

View joshuapekera's full-sized avatar

Joshua Pekera joshuapekera

View GitHub Profile
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 23, 2025 13:57
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@joshuapekera
joshuapekera / gist:2571235
Created May 1, 2012 20:46 — forked from yahelc/gist:1004702
Simpler Twitter Intents / Google Analytics Script
(function(){
var event_names = {
"click" : "" ,
"tweet" : "",
"retweet" : "source_tweet_id",
"follow" : "screen_name",
"favorite" : "tweet_id"
};
for(var event_name in event_names)
@joshuapekera
joshuapekera / Asynchronous Facebook Twitter Google buttons and Google Analytics Social Tracking This .js file will render HTML5 social buttons asynchronously as well as bind callbacks to Google Analytics. Twitter Follow Action and Facebook Comment tracking included.
window.fbAsyncInit = function() {
FB.init({
appId : '123456', // ENTER your FB App ID
//channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
_ga.trackFacebook(); //Google Analytics tracking
@pmeinhardt
pmeinhardt / webinspect-ios-simulator.sh
Created April 27, 2012 10:16
web-inspect mobile safari running in the ios simulator
#!/bin/bash
# Based on Nathan de Vries' findings http://goo.gl/jbtzX
MSPID=$(ps x | grep "MobileSafari" | grep -v grep | awk '{ print $1 }')
if [ -z "$MSPID" ]; then
echo "Run \"Mobile Safari.app\" in the Simulater to enable remove debugging."
exit 1
fi
@tricil
tricil / Asynchronous Facebook Twitter Google+ buttons and Google Analytics Social Tracking
Created April 21, 2012 04:21
This .js file will render HTML5 social buttons asynchronously as well as bind callbacks to Google Analytics. Twitter Follow Action and Facebook Comment tracking included.
window.fbAsyncInit = function() {
FB.init({
appId : '123456', // ENTER your FB App ID
//channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
_ga.trackFacebook(); //Google Analytics tracking
@joebrislin
joebrislin / index.cfm
Created April 11, 2012 19:47
Secondary Navigation Generation for ColdFusion and Twitter Bootstrap
<cfoutput>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/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/2108403/hack.sh | sh
#
@0xced
0xced / Makefile
Created March 23, 2012 15:02
Experiment ->isa vs object_getClass()
OPTIONS = metaclass.m -o metaclass -std=c99 -framework Foundation -arch x86_64 -Os
isa:
clang -DUSE_ISA=1 $(OPTIONS)
./metaclass
object_getClass:
clang -DUSE_ISA=0 $(OPTIONS)
./metaclass
@paulirish
paulirish / rAF.js
Last active April 17, 2025 15:06
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@scottjehl
scottjehl / hideaddrbar.js
Created August 31, 2011 11:42
Normalized hide address bar for iOS & Android
/*
* Normalized hide address bar for iOS & Android
* (c) Scott Jehl, scottjehl.com
* MIT License
*/
(function( win ){
var doc = win.document;
// If there's a hash, or addEventListener is undefined, stop here
if( !location.hash && win.addEventListener ){