This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pake_desc('Update the README with the latest command output'); | |
pake_task('readme'); | |
function run_readme() | |
{ | |
pake_echo_comment('Updating README documentation'); | |
$startPoint = '## Help'; | |
$endPoint = '## Examples'; | |
$readme = file_get_contents('README.md'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump -u username -p --add-drop-table --no-data dbname | grep "^DROP.*\`xx_" | mysql -u username -p dbname |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Vertebrate = {}; | |
Vertebrate.Model = Backbone.Model.extend(); | |
Vertebrate.Collection = Backbone.Collection.extend({ | |
model: Vertebrate.Model | |
}); | |
// Source: http://en.wikipedia.org/wiki/Vertebrates | |
var vertebrates = new Vertebrate.Collection([ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global process: true, module: true*/ | |
// JST-HB | |
// | |
// Description: Compile handlebars templates to JST file. | |
// | |
var fs = require('fs'), | |
path = require('path'), | |
Handlebars = require('handlebars'), | |
_ = require('underscore'), | |
minify = require('html-minifier'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
formEvent: function (event) { | |
console.log(event); // "Not defined!" -- Firefox | |
eventType = event.target.type; | |
switch (eventType) { | |
case "checkbox": | |
classArray = event.target.classList; | |
key = classArray[0]; | |
value = classArray[1]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{hifi.http.get.jsonCallback}}({"title":"{{ this.title|e('js') }}","content":"{{ this.content|e('js') }}"}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Backbone JSONP Model Abstract | |
// ============================================================================= | |
// | |
// * Author: [Craig Davis]([email protected]) | |
// * Since: 1/4/2013 | |
// ----------------------------------------------------------------------------- | |
// | |
define([ | |
"jquery", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(chref=d.href).replace(e.href,"").indexOf("#")&&(!/^[a-z\+\.\-]+:/i.test(chref)||chref.indexOf(e.protocol+"//"+e.host)===0)&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://github.com/davidbrewer/tmux-conf/blob/master/tmux.conf | |
# change to the screen hotkey | |
unbind C-b | |
unbind l | |
set-option -g prefix C-a | |
# Reload key | |
bind r source-file ~/.tmux.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Adapted from http://kutuma.blogspot.com/2007/08/sending-emails-via-gmail-with-python.html | |
import getpass | |
import smtplib | |
from email.MIMEMultipart import MIMEMultipart | |
from email.MIMEBase import MIMEBase | |
from email.MIMEText import MIMEText | |
from email import Encoders | |
import os |