- Authoring Ebooks: http://www.authoringebooks.com/
- Create Your Own Programming Language: http://createyourproglang.com/
- Exceptional Ruby: http://exceptionalruby.com/
- JavaScript Performance Rocks: http://javascriptrocks.com/performance/
- Redmine Tips: http://www.redminetips.com/
- The SPDY Book: http://spdybook.com/
- Rails 3 Upgrade Handbook: http://www.railsupgradehandbook.com/
- Refactoring Redmine: http://www.refactoringredmine.com/book/
- Bootstrapping Design: http://bootstrappingdesign.com/
- Recipes With Backbone:
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 'faraday_middleware' | |
require 'hashie/mash' | |
# Public: GeoIP service using freegeoip.net | |
# | |
# See https://github.com/fiorix/freegeoip#readme | |
# | |
# Examples | |
# | |
# res = GeoipService.new.call '173.194.64.19' |
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
# before this file is loaded, a locale should be set: | |
# | |
# In a browser environment, you can use: | |
# ```<script>__locale='en';</script>``` | |
# | |
# In a server environment (specifically node.js): | |
# ```global.__locale = 'en';``` | |
# normalize in-app locale string to "en" or "de-AT" | |
parts = @__locale.split('-') |
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 User = require("lib/models/user-model"); | |
User.find("dandean", function(e, user) { | |
user.email = "rad@radical.com"; | |
user.save(); | |
}); |
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
/* | |
Uses http://jsonselect.org/ to select fields from a riak object | |
*/ | |
function map_jsonselect(values, keydata, arg) { | |
var data = Riak.mapValuesJson(values)[0]; | |
if(typeof arg == "string") { | |
return JSONSelect.match(arg, data); | |
} else if(typeof arg == "object") { | |
var accum = {} |
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
express = require "express" | |
sys = require "sys" | |
util = require "util" | |
oauth = require "oauth" | |
fs = require "fs" | |
app = module.exports = express.createServer() | |
app.configure('development', () -> | |
app.use(express.errorHandler({ dumpExceptions: true, showStack: true })) |
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
// Backbone.history with HTML5 support | |
(function() { | |
var loc = window.location, | |
pushSupport = !!(window.history && window.history.pushState), | |
hashStrip = /^#*/; | |
// add HTML5 support to Backbone.history, drop the old IE stuff | |
_.extend(Backbone.History.prototype, { | |
getFragment : function(l) { |
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
# Step( | |
# () -> redis.select 15, @ | |
# () -> redis.flushdb @ | |
# () -> redis.rpush 'fakelist', '1', @ | |
# () -> redis.rpush 'fakelist', '2', @ | |
# () -> redis.rpush 'fakelist', '3', @ | |
# () -> redis.lrange 'fakelist', 0, 1, @ | |
# (err, arr) -> | |
# console.log arr.length | |
# console.log arr[0].toString() |