Skip to content

Instantly share code, notes, and snippets.

@meleyal
meleyal / hello-world-route.js
Created August 3, 2010 10:55
Hello world with route.js
route('#/hello').bind(myFunction);
function myFunction(){
alert('Hello world');
}
// route('#/hello').run();
var App={};
App._hashchange_last = '';
@meleyal
meleyal / console.log
Created August 3, 2010 15:44
console.log textmate snippet
// Activation: Tab Trigger > log
console.log($1);
@meleyal
meleyal / git-recipes.sh
Created August 16, 2010 13:38
git recipes
# remove delete files
git rm $(git ls-files -d)
# delete remote branch
git push origin :branch-to-delete
@meleyal
meleyal / wesabe-startup.sh
Created September 13, 2010 20:45
wesabe startup script
#!/bin/sh
echo 'starting mysql'
mysqld_safe &
echo 'starting pfc'
cd ~/code/wesabe/pfc
rails server -p 3001 &
echo 'starting brcm'
cd ~/code/wesabe/brcm-accounts-api
script/server &
echo 'ok, go!'
@meleyal
meleyal / align-css-assignments.rb
Created November 26, 2010 11:37
Align CSS Assignments Textmate command
#!/usr/bin/env ruby
#
# Assignment block tidier, version 0.6.
#
# Copyright Chris Poirier 2006, 2008.
# Licensed under the Academic Free License version 3.0.
#
# This script can be used as a command for TextMate to align all of the equal signs
# within a block of text, as well as all variable declarations in languages like
# Objective-C and Java. When using it with TextMate, set the command input to
@meleyal
meleyal / 960.css
Created December 7, 2010 16:44
custom version of 960.gs
/*! ------------------------------------------------------------------------------------------------
* 960.css
* http://gist.github.com/732028
* Custom version of http://960.gs/
* Licensed under GPL and MIT
*
* Custom:
* - underscores > dashes
* - container > wrap
* - alpha > first
@meleyal
meleyal / meleyal.html
Created February 3, 2011 20:07
meleyal.com tumblr theme
<!DOCTYPE html>
<html lang="en">
<head>
<!--
meleyal
http://meleyal.com
https://gist.github.com/810100
@meleyal
meleyal / widget-template.js
Created February 10, 2011 10:40 — forked from ehynds/widget-template.js
jquery.ui.widget template
(function($){
$.widget("ui.mywidget", {
options: {
autoOpen: true
},
_create: function(){
// by default, consider this thing closed.
@meleyal
meleyal / $.widget.bridge.template.js
Created February 17, 2011 11:17
jQuery $.widget.bridge template
// http://www.erichynds.com/jquery/using-jquery-ui-widget-factory-bridge/
var Widget = function(options, element){
this.options = options;
this.element = element;
this._init();
}
Widget.prototype = {
@meleyal
meleyal / namer.py
Created February 24, 2011 13:56 — forked from xwmx/namer.py
namer.py
#!/usr/bin/env python
# Name generating code
# Copyright (c) 2010 Ninite.com
#
# Released into the public domain - enjoy!
#
# Story at http://blog.ninite.com/post/620277259/how-ninite-was-named-by-a-computer-program
from datetime import datetime, date