Skip to content

Instantly share code, notes, and snippets.

View bradparks's full-sized avatar

Brad Parks bradparks

  • Fredericton, New Brunswick, Canada
View GitHub Profile
//
// AWTextureEffects.h
//
// Created by Manuel Martinez-Almeida Castañeda on 09/05/10.
// Copyright 2010 Abstraction Works. All rights reserved.
// http://www.abstractionworks.com
//
#import "CCMutableTexture2D.h"
@bradparks
bradparks / jquery_recurrence_minimal_example
Created July 11, 2012 15:25
an absolutely minimal example of using the jQuery Recurrence Input plugin, which implements a Google Calendar like dialog for repeating events
<html>
<head>
<title>JQuery.RecurrenceInput Demo</title>
<link type="text/css" href="jquery.tools.dateinput.css" rel="stylesheet"></link>
<link type="text/css" href="jquery.recurrenceinput.css" rel="stylesheet"></link>
<link type="text/css" href="overlays.css" rel="stylesheet"></link>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
@bradparks
bradparks / show
Created July 17, 2012 11:40 — forked from tekacs/show
This does something essentially equivalent to showoff.io if you have a publicly facing server...
# Usage: show <local-port> <subdomain>
function show() {
DOMAIN=".tekacs.com"
REMOTE="$2$DOMAIN"
ssh -tR 1080:127.0.0.1:$1 vps "sudo ssh -Nl \$USER -L $REMOTE:80:127.0.0.1:1080 localhost"
}
##########################################################################################################
more details on how this works from original gist:
@bradparks
bradparks / fixed_html_footer
Created July 29, 2012 11:52
fixed html footer
/*jslint regexp: false, continue: true, indent: 4 */
/*global $, alert, jQuery */
(function ($) {
$.tools = $.tools || {version: '@VERSION'};
var tool;
var LABELS = {};
function safeInArray(value, aryData)
@bradparks
bradparks / gist:3880920
Created October 12, 2012 19:12
how to find which elements in a page have a background image matching some substrings using jquery
// finds elements that have the keywords 'blue' and 'ajax' in their background-image url
$('*').filter(function() {
var p = $(this).css('background-image');
var success = true;
success &= p.indexOf('blue') != -1;
success &= p.indexOf('ajax') != -1;
if (success)
import sys.FileSystem;
import sys.io.File;
/**
Haxe port of nekoboot.neko for creating executables from neko bytecode.
Original: http://code.google.com/p/nekovm/source/browse/trunk/src/tools/nekoboot.neko
Usage : nekoboot <file.n>
*/
import sys.FileSystem;
import sys.io.File;
/**
Haxe port of nekoboot.neko for creating executables from neko bytecode.
Original: http://code.google.com/p/nekovm/source/browse/trunk/src/tools/nekoboot.neko
Usage : nekoboot <file.n>
*/
package ;
import haxe.ds.ObjectMap;
#if haxe2
typedef Map<String, T> = Hash<T>;
#end
class HxEvents
{
function eachAsync(collection, iterator, callback) {
var iterate = function(i) {
setTimeout(function() {
iterator(collection[i]);
if (i < collection.length) {
iterate(i + 1);
} else {
callback();
}
}, 0);