Skip to content

Instantly share code, notes, and snippets.

View wookiehangover's full-sized avatar
💭
just setting up my gthb...

Sam Breed wookiehangover

💭
just setting up my gthb...
View GitHub Profile
{
'groups': [
{
'id': 1,
'name': 'jQuery Team',
'children': [
{
'id': 2,
'name': 'John Resig'
},
# Tips for jQuery Bug Patching
# There are some assumptions made here, one being that you're
# set up with some form of "localhost" http server and that it's running.
# - http://www.mamp.info/en/mamp/
# - sudo apt-get install apache2
# Get it running:
# On Mac:
<!DOCTYPE html>
<html>
<head>
<title>Templating Rocks!</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" />
<script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script>
<script src="js/jquery.tmpl.min.js"></script>
<script src="js/script.js"></script>
</head>
function populateList(context, $template, $list, refresh){
var items = $template.tmpl(context);
$list.empty().append(items);
if( refresh === true ) {
$list.listview('refresh');
}
}
@wookiehangover
wookiehangover / maps.js
Created April 30, 2011 07:30
a wrapper for the bing maps api
(function(win, $, Microsoft) {
if( !$ || !Microsoft ) {
throw "Missing dependencies";
}
var MS = function( $map ){
var API_KEY = 'An8yWa3XskSOa7CEhg2XSUayDt3feSVnj4ckyklE934aIVKoNOS6kTtP4RCIY-X_',
BASE_URL = 'http://dev.virtualearth.net/REST/v1/',
@wookiehangover
wookiehangover / fiddle.css
Created May 6, 2011 17:28
yet another css3 gallery
.gal-wrapper {
width: 100%;
height: 198px;
position: relative;
padding: 0 1em;
margin: 0 -1em;
background-image: -webkit-gradient(
linear, left bottom, right bottom, color-stop(0.1, rgb(72,72,72)), color-stop(0.5, rgb(117,117,117)), color-stop(0.9, rgb(74,74,74))
);
@wookiehangover
wookiehangover / default.appcache
Created May 18, 2011 19:38
Application Cache Simple Config
CACHE MANIFEST
#version 1
index.html
css/styles.css
js/script.js
js/libs/jquery-1.5.2.min.js
js/libs/underscore-min.js
@wookiehangover
wookiehangover / default.appcache
Created May 18, 2011 19:40
Application Cache Simple Config with Network
CACHE MANIFEST
#version 2
index.html
css/styles.css
js/script.js
js/libs/jquery-1.5.2.min.js
js/libs/underscore-min.js
NETWORK:
@wookiehangover
wookiehangover / gist:1197894
Created September 6, 2011 15:38
ffmpegvideo.sh
#!/bin/bash
# This script transcodes various video formats to MPEG2 Video and
# AC3 audio in an MPEG2 Transport Stream for the DirecTV HR2x
#
# FFMpeg and Mediainfo must be installed for this script to work.
#
# Input Parameters: Input, Output, Video Bitrate, Audio Bitrate
#
# Revision 2.00 11/29/2008
Counting objects: 82, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (48/48), done.
Writing objects: 100% (48/48), 10.36 KiB, done.
Total 48 (delta 31), reused 0 (delta 0)
remote: error: unable to unlink old 'app/collections/notifications.coffee' (Permission denied)
remote: error: unable to unlink old 'app/collections/platforms.coffee' (Permission denied)
remote: error: unable to unlink old 'app/controllers/help/help_controller.coffee' (Permission denied)
remote: error: unable to unlink old 'app/lib/init.coffee' (Permission denied)
remote: error: unable to unlink old 'app/lib/router.coffee' (Permission denied)