Skip to content

Instantly share code, notes, and snippets.

View StanAngeloff's full-sized avatar

Stan Angeloff StanAngeloff

View GitHub Profile
@StanAngeloff
StanAngeloff / yoke.js
Created February 23, 2011 15:50
A drop-in, quick and dirty alternative to Sprockets
#!/usr/bin/env node
var fs = require('fs'),
path = require('path'),
options = {
verbose: false,
directories: ['.']
};
var includeFollowing = false;
@StanAngeloff
StanAngeloff / gist:732605
Created December 7, 2010 23:05
Comma-first English

It's twilight.
The sun escorts the moon to the night.
The sun sleeps
, the wind howls.
My sweetheart smiles.
Autumn chill
, Sweetheart's warm feel
, Sultry looks
, Heart be still.

@StanAngeloff
StanAngeloff / namespaces.coffee
Created December 7, 2010 14:06
A quick and dirty way to use namespaces in CoffeeScript
# Code:
#
namespace = (target, name, block) ->
[target, name, block] = [exports ? window, arguments...] if arguments.length < 3
top = target
target = target[item] or= {} for item in name.split '.'
block target, top
# Usage:
#
make -B -f Make_cyg.mak GUI=yes PYTHON=c:/bin/tools/python/2.7 PYTHON_VER=27 RUBY=c:/bin/tools/ruby/1.8.7 RUBY_VER=18 RUBY_VER_LONG=1.8 RUBY_PLATFORM=i386-mingw32 OLE=yes ARCH=i386 FEATURES=HUGE NETBEANS=no gvim.exe
@StanAngeloff
StanAngeloff / executable_classes.coffee
Created November 21, 2010 16:05
executable_classes.coffee
class Sun extends Star
@attr 'mass'
private = 'private'
@public = 'public'
@instance_method = ->
Sun.static_method = ->
# or perhaps @@ for Sun
@StanAngeloff
StanAngeloff / code.coffee
Created November 20, 2010 16:42
Nope, this is not some fancy non-ANSI SQL; this is CoffeeScript
SELECT = (map, results) -> map.call each for each in results
FROM = (list, reduce) -> each for each in list when reduce each
WHERE = (reduce) -> (each) -> reduce.call each
% coffee test.py
Hello
%
@StanAngeloff
StanAngeloff / git-extract.sh
Created November 5, 2010 19:57
Get those changed files out of Git
#!/bin/bash
BOLD="\033[1m"
_BOLD="\033[22m"
RED="\033[31m"
YELLOW="\033[33m"
GREEN="\033[32m"
RESET="\033[39m"
range=$1
Version = 4
Booleans = {'caretLineVisible': True, 'preferFixed': 1, 'useSelFore': False}
CommonStyles = {'attribute name': {'fore': 8904824},
'attribute value': {'fore': 13676752},
'bracebad': {'back': 0, 'bold': 1, 'fore': 13421823},
'bracehighlight': {'bold': 1, 'fore': 6710886},
'classes': {'fore': 16761856},
'comments': {'bold': False,
% sass page.scss page.css
Errno::ENOENT: No such file or directory - page.scss
Use --trace for backtrace.