Skip to content

Instantly share code, notes, and snippets.

View joelhooks's full-sized avatar
🍄

Joel Hooks joelhooks

🍄
View GitHub Profile
package org.robotlegs.utilities.remote
{
import com.adobe.serializers.json.JSONDecoder;
import mx.collections.ArrayCollection;
public class JsonRemoteService extends RemoteServiceBase
{
public function JsonRemoteService(rootURL:String = "")
{
@squeedee
squeedee / LoggingCommandMap.as
Created August 1, 2010 20:58
Really Helpful commandMap logging for your Robotlegs apps
package com.visfleet.robotlegs {
import com.visfleet.core.isNotNull;
import flash.events.Event;
import flash.events.IEventDispatcher;
import mx.logging.ILogger;
import mx.logging.Log;
@nsdevaraj
nsdevaraj / ColorUtil.as
Created October 21, 2010 10:37
Static functions for conversions like RGB to CMYK, RGB to HSV, HSV to RGB, ColorTransformation, int color value to RGB and Color Calculations.
package
{
import flash.geom.ColorTransform;
public class ColorUtil
{
/**
* RGBColorTransform Create an instance of the information.
* @ Param rgb RGB integer value that indicates (0x000000 - 0xFFFFFF)
* @ Param amount of fill adaptive value (0.0 - 1.0)
* @ Param alpha transparency (0.0 - 1.0)
@bergie
bergie / README.md
Created May 18, 2011 11:33
Falsy Values tutorials
anonymous
anonymous / bootstrap.sh
Created June 2, 2011 17:19
Django on Heroku with Celery and Sentry
virtualenv --no-site-packages .
source bin/activate
bin/pip install Django psycopg2 django-sentry
bin/pip freeze > requirements.txt
bin/django-admin.py startproject mysite
cat >.gitignore <<EOF
bin/
include/
lib/
EOF
@lukeredpath
lukeredpath / ExampleClass.m
Created June 30, 2011 22:18
Macro for creating your "shared instance" using GCD
@implementation MySharedThing
+ (id)sharedInstance
{
DEFINE_SHARED_INSTANCE_USING_BLOCK(^{
return [[self alloc] init];
});
}
@end
@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 ){

High level style in javascript.

Opinions are like assholes, every one has got one.

This one is mine.

Punctuation: who cares?

Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.

@olasitarska
olasitarska / pgessays.py
Created November 18, 2012 10:11
Builds epub book out of Paul Graham's essays.
# -*- coding: utf-8 -*-
"""
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html
Author: Ola Sitarska <ola@sitarska.com>
Copyright: Licensed under the GPL-3 (http://www.gnu.org/licenses/gpl-3.0.html)
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/
"""
@tallship
tallship / install_tmux_centos6.sh
Created March 8, 2013 20:00
Install tmux on CentOS 6 this is a quick script for Installing the latest [libevent and] tmux on CentOS 6.3 Before anything, do a "yum update" It will install deps, download the latest sources (a/o 20130308), then compile and install everything. Deps: gcc kernel-devel make ncurses-devel (We're installing the latest libevent by hand). Next, we d/…
#!/bin/sh
# install_tmux_centos6.sh
# Make sure we have the deps
yum -y install gcc kernel-devel make ncurses-devel
# Get libevent and tmux source, and put it all under /usr/local/src
# and then untar it all, and config/compile/install them.
mkdir -p /usr/local/src/libevent
mkdir -p /usr/local/src/tmux