- 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
var error = new Error; | |
Object.defineProperty(global, '__stack', { | |
get: function(){ | |
Error.prepareStackTrace = function(err, frames){ | |
err.frames = frames; | |
}; | |
try { | |
throw error; | |
} catch (err) { |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Felix Gnass <https://github.com/fgnass> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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 Filters[T] { | |
//Some boilerplate-busting aliases | |
type FilterResult = Either[Rejection, T] | |
type FilterFunc = (T) => FilterResult | |
//Handy helpers | |
//Rejection can carry as much info as you wish; | |
// Filter name, value in error, an exception, etc. | |
case class Rejection(input: T, msg: String) |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 @louis_remi <http://louisremi.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
# .---------------- minute (0 - 59) | |
# | .------------- hour (0 - 23) | |
# | | .---------- day of month (1 - 31) | |
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... | |
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat | |
# | | | | | | |
# * * * * * command to be executed |
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 | |
set -e | |
SCALA_DEV=~/code/scala | |
HASH=`git --git-dir $SCALA_DEV/.git rev-list "$1" | head -n1` | |
DESC=`git --git-dir $SCALA_DEV/.git describe $HASH` | |
shift | |
DIR=~/usr/scala-$DESC | |
SCALA=$DIR/pack/bin/scala |
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
object lzw { | |
trait Appendable[T] { | |
def append(value: T) | |
} | |
import scala.collection.generic._ | |
case class GrowingAppendable[T](growable: Growable[T]) extends Appendable[T] { | |
def append(value: T) { | |
growable += value |
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
Map { | |
/*background-color: #b8dee6;*/ | |
} | |
#countries[ADMIN='Nicaragua'] { | |
polygon-fill:#abd69b; | |
line-color:#754098; | |
polygon-opacity:0; | |
line-width:6; | |
line-opacity:0.8; |
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
// The goal... | |
[NSPredicate predicateWithFormat:@"dateModified >= CAST(CAST(now(), \"NSNumber\") - %d, \"NSDate\")", (30*86400)]; | |
//"now()" is a function and takes no arguments | |
NSExpression *now = [NSExpression expressionForFunction:@"now" arguments:[NSArray array]]; | |
//CAST(now(), 'NSNumber') | |
NSArray *castNowArguments = [NSArray arrayWithObjects:now, [NSExpression expressionForConstantValue:@"NSNumber"], nil]; | |
NSExpression *castNow = [NSExpression expressionForFunction:@"castObject:toType:" arguments:castNowArguments]; | |
OlderNewer