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 / 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:
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);

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption
import nme.Assets;
import nme.display.Shape;
import nme.display.Sprite;
import format.SVG;
class SVGExample extends Sprite
{
var svg:SVG;
var shape:Shape;
/*
Buttondown
A Markdown/MultiMarkdown/Pandoc HTML output CSS stylesheet
Author: Ryan Gray
Date: 15 Feb 2011
Revised: 21 Feb 2012
General style is clean, with minimal re-definition of the defaults or
overrides of user font settings. The body text and header styles are
left alone except title, author and date classes are centered. A Pandoc TOC
#!/bin/bash
### ABOUT: See: http://gist.github.com/366269
### Runs rsync, retrying on errors up to a maximum number of tries.
### On failure script waits for internect connection to come back up by pinging google.com before continuing.
###
### Usage: $ ./rsync-retry.sh source destination
### Example: $ ./rsync-retry.sh user@server.example.com:~/* ~/destination/path/
###
### INPORTANT: