This file contains 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 assert = require('assert'); | |
var helpers = { | |
view: function() { | |
return "viewing: " + this.msg; | |
} | |
} | |
// jade | |
// "h1= view()" | |
// compiled jade |
This file contains 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
brew update | |
brew tap homebrew/dupes | |
brew install apple-gcc42 | |
export CC=gcc-4.2 | |
curl https://gist.github.com/rorcraft/8815129/raw/f184726d7dd8d306d6f63acd97c39bb8ea6dbb84/jamesgolick-ruby > ~/.rbenv/plugins/ruby-build/share/jamesgolick | |
rbenv install jamesgolick |
This file contains 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 through = require('through2') | |
, gutil = require('gulp-util') | |
function cwebp() { | |
var Webp = require('cwebp') | |
, File = require('vinyl') | |
return through.obj(function (file, enc, cb) { | |
this.push(file) | |
if (file.isBuffer()) { |
This file contains 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
// 1. bind every function | |
function foo(locale) { | |
return locale + '-foo'; | |
} | |
module.exports = function helper(locale) { | |
return { | |
foo: foo.bind(null, locale) | |
} |
This file contains 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
# This is the default .slate file. | |
# If no ~/.slate file exists this is the file that will be used. | |
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
# Resize Bindings | |
bind right:alt;ctrl resize +10% +0 | |
bind left:alt;ctrl resize -10% +0 |
This file contains 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
class BaseCodec | |
def self.base_n_decode(s, alphabets) | |
n = alphabets.length | |
rv = pos = 0 | |
charlist = s.split("").reverse | |
charlist.each do |char| | |
rv += alphabets.index(char) * n ** pos | |
pos += 1 | |
end | |
return rv |
This file contains 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
require "rubygems" | |
require "hmac-sha1" | |
require "base64" | |
ankoder_access_key = ANKODER_ACCESS_KEY | |
private_key = ANKODER_PRIVATE_KEY | |
ankoder_date = Time.now.strftime("%a, %d %b %Y %X GMT") | |
ankoder_action = "GET" | |
ankoder_path = "/video.xml" | |
string = "-#{ankoder_date}-#{ankoder_action}-#{ankoder_path}-" |
This file contains 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
require "rubygems" | |
require "hmac-sha1" | |
require "base64" | |
ankoder_access_key = ANKODER_ACCESS_KEY | |
private_key = ANKODER_PRIVATE_KEY | |
ankoder_date = Time.now.strftime("%a, %d %b %Y %X GMT") | |
ankoder_action = "GET" | |
ankoder_path = "/video.xml" | |
string = "-#{ankoder_date}-#{ankoder_action}-#{ankoder_path}-" |
This file contains 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
require "rubygems" | |
require "hmac-sha1" | |
require "base64" | |
ankoder_access_key = ANKODER_ACCESS_KEY | |
private_key = ANKODER_PRIVATE_KEY | |
ankoder_date = Time.now.strftime("%a, %d %b %Y %X GMT") | |
ankoder_action = "GET" | |
ankoder_path = "/video.xml" | |
string = "-#{ankoder_date}-#{ankoder_action}-#{ankoder_path}-" |
This file contains 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
<script src="http://widgets.twimg.com/j/2/widget.js"></script> | |
<script> | |
new TWTR.Widget({ | |
version: 2, | |
type: 'profile', | |
rpp: 4, | |
interval: 6000, | |
width: 'auto', | |
height: 300, | |
theme: { |
OlderNewer