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
// three.js JSON Atlas Loader | |
// Requires: whatwg-fetch (https://github.com/github/fetch) | |
var materials = {} | |
fetch('images/spritesheet.json').then(function(response) { | |
return response.json() | |
}).then(function(json) { | |
var atlasTexture = THREE.ImageUtils.loadTexture('images/' + json.meta.image, undefined, function() { |
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
# JS files | |
JS_FINAL = js/project-name-all.js | |
JS_TARGETS = js/file1.js \ | |
js/file2.js \ | |
js/file3.js | |
# CSS files | |
CSS_FINAL = css/project-name-all.css | |
STYLUS_TARGETS = css/file1.styl \ |
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 distance_of_time_in_words, time_ago_in_words; | |
time_ago_in_words = function(from_time, include_seconds) { | |
if (include_seconds != null) { | |
include_seconds; | |
} else { | |
include_seconds = false; | |
}; | |
return distance_of_time_in_words(from_time, Date.now(), include_seconds); | |
}; | |
distance_of_time_in_words = function(from_time, to_time, include_seconds) { |
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
# http://www.mono-project.com/Compiling_Mono_on_OSX | |
require 'formula' | |
class Mono < Formula | |
#url 'http://download.mono-project.com/sources/mono/mono-3.0.6.tar.bz2' | |
#sha1 'e2187f80366fcd65c55a1ab946f8d3b39e81be77' | |
url 'http://download.mono-project.com/sources/mono/mono-2.11.4.tar.bz2' | |
sha1 '41707d3b6a1bd8380f4150474602c19e5e88e3f8' | |
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
http://estelle.github.com/mobileperf/#slide55 | |
https://github.com/impressiver/velocity2012 | |
https://github.com/jonlives/velocity_resources | |
Chef - Jon Cowie (Etsy) | |
Ele tem um handler que consegue mandar o que falha para or irc usando |
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 'toadhopper' | |
require 'em-synchrony/em-http' | |
class Toadhopper | |
def post_document(document, headers={}) | |
uri = URI.parse(@error_url) | |
begin | |
response = EM::HttpRequest.new(uri).post({ | |
:body => document, | |
:head => {'Content-type' => 'text/xml', 'Accept' => 'text/xml, application/xml'}.merge(headers) |
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
@saas_publisher = @saas_publishers.find(params[:id]) | |
@saas_publisher.publisher.update_attributes(params[:saas_publisher].delete(:publisher)) | |
@saas_publisher.update_attributes(params[:saas_publisher]) |
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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
## | |
# test/spec/mini 3 | |
# http://gist.github.com/25455 | |
# [email protected] | |
# file:lib/test/spec/mini.rb | |
# | |
def context(*args, &block) | |
return super unless (name = args.first) && block | |
require 'test/unit' | |
klass = Class.new(defined?(ActiveSupport::TestCase) ? ActiveSupport::TestCase : Test::Unit::TestCase) do |