Skip to content

Instantly share code, notes, and snippets.

View codekiln's full-sized avatar
🎧
Feedback Loops

M∎∎r codekiln

🎧
Feedback Loops
View GitHub Profile
@jrburke
jrburke / build.js
Created December 22, 2011 05:58
Doing multiple almond builds with a nodejs script, example
//Download jquery.js and place it in the build, do not use require-jquery.js
//in the build, since each of the build layers just needs almond and not the
//full require.js file.
//This file is run in nodejs to do the build: node build.js
//Load the requirejs optimizer
var requirejs = require('./r.js');
//Set up basic config, include config that is
//common to all the requirejs.optimize() calls.
@frane
frane / ArrayObjectDemo.coffee
Created December 31, 2011 02:19
Traversing arrays and objects in CoffeeScript
# Traversing arrays and objects in CoffeeScript
# The array and object we use for testing
arr = [1, 2, 3, 4, 5]
obj = {a: 1, b: 2, c: 3, d: 4, e: 5}
# 'in' has a different meaning in CoffeeScript than in JavaScript
# CS: element in array -> JS: array.indexOf(element) >= 0
console.log '5 in arr: ' + (5 in arr)
@gregorynicholas
gregorynicholas / .inputrc
Last active April 19, 2024 04:10
OSX .inputrc to make terminal way better. and by better i mean i'm naked
"\e[1~": beginning-of-line
"\e[4~": end-of-line
"\e[5~": history-search-backward
"\e[6~": history-search-forward
"\e[3~": delete-char
"\e[2~": quoted-insert
"\e[5C": forward-word
"\e[5D": backward-word
"\e\e[C": forward-word
"\e\e[D": backward-word
@dcosson
dcosson / ableton-pre-commit.py
Created March 3, 2012 22:58
Quick first attempt at using git for Ableton Live projects.
#!/usr/bin/env python
""" A pre-commit git hook that gunzips the .als file and adds the resulting xml file to the git staging index.
Caveat:
It doesn't work perfectly to do a `git add` in a pre-commit hook - if nothing else in the repo has changed,
the pre-commit won't even be fired so nothing happens. If something else has changed, the pre-commit hook
doesn't get fired in time for the files it creates to show up in the list of files to be committed but the
files it creates do actually go into the commit. So it works, but that's kind of weird.
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 5, 2024 22:16 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@mhawksey
mhawksey / gist:3436048
Last active May 8, 2016 23:49
Google Spreadsheet/Apps Script custom function for getting Klout scores for Twitter screen name(s). You can File > Make a copy of this template https://docs.google.com/spreadsheet/ccc?key=0AqGkLMU9sHmLdDVzZWdLbElhM3NYM2VQZi1lYjZXUUE&usp=drive_web#gid=0 for working version of the code
/* Copyright 2012 Martin Hawksey (email : martin.hawksey@gmail.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@btimby
btimby / settings.py
Last active August 24, 2021 14:35
Use a Django database router, a TestCase mixin and thread local storage to allow unit tests to switch databases.
# Detect if executed under test
TESTING = any(test in sys.argv for test in (
'test', 'csslint', 'jenkins', 'jslint',
'jtest', 'lettuce', 'pep8', 'pyflakes',
'pylint', 'sloccount',
))
if TESTING:
# If testing, move the default DB to 'mysql' and replace it
# with a SQLite DB.
@hofmannsven
hofmannsven / README.md
Last active July 16, 2024 01:30
Git CLI Cheatsheet
@brian-mann
brian-mann / gist:7085402
Last active September 3, 2017 20:14
The latest and greatest folder and file structure for Backbone / Marionette Apps
##Folder structure
/backbone
app.js
/apps
/entities
/lib
##Inside Apps
/apps
@obstschale
obstschale / octave.md
Last active June 8, 2024 19:46
An Octave introduction cheat sheet.