Skip to content

Instantly share code, notes, and snippets.

View joshuapekera's full-sized avatar

Joshua Pekera joshuapekera

View GitHub Profile
@davegurnell
davegurnell / ios-scroll.js
Created January 23, 2011 11:16
iOS HTML5 Scrollpane
/* iOS scrollpane jQuery plugin, v1.0
* ==================================
*
* (c) 2011 Dave Gurnell
* http://boxandarrow.com
*
* Distributed under the Creative Commons Attribution 3.0 Unported licence:
* http://creativecommons.org/licenses/by/3.0/
*/
@balupton
balupton / ajaxify-html4.js
Created March 7, 2011 04:58
Ajaxify a Website using the HTML4 HashChange Functionality
(function(window,undefined){
// Prepare our Variables
var
document = window.document,
$ = window.jQuery;
// Wait for Document
$(window).bind(function(){
// Prepare Variables
@csasbach
csasbach / tooltip.css
Created March 13, 2011 00:34
Create tooltips on mouseover or on click (for supporting touch interfaces).
abbr
{
border-bottom: 1px dotted #666;
cursor: help;
}
.tooltip
{
position:absolute;
background-color:#eeeefe;
@yahelc
yahelc / gist:1004702
Created June 2, 2011 16:02
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)
@threedaymonk
threedaymonk / download-basecamp-files.rb
Created June 14, 2011 14:52
Quick and dirty script to download all the files from a Basecamp account.
require "nokogiri"
require "time"
require "fileutils"
url = "https://whatever.basecamphq.com"
api_key = YOUR_API_KEY
curl_options = "-u #{api_key}:X -H 'Accept: application/xml' -H 'Content-Type: application/xml'"
def sanitize(s)
@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 ){
@paulirish
paulirish / rAF.js
Last active July 19, 2024 19:50
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'];
@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
@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
#
@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="">