a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
'use strict'; | |
var tcp = require('net'); | |
var s1 = tcp.createServer().listen(9000); | |
var s2 = tcp.createServer().listen(9001); | |
var s3 = tcp.createServer().listen(9002); |
module VarAccessor | |
Sass::Script::Functions.send :include, self | |
def self.variables | |
@variables ||= {} | |
end | |
def self.set(values = {}) | |
variables.merge! values | |
end |
# app/concerns/let.rb | |
# Ripped from Rspec 2.0 beta.12 | |
# I've found it so useful in Rspec, I made it into a module. Controller code with shared | |
# code seem to have a lot of use for this. For example, in inherited_resources, you would | |
# typically override model, parent, etc. to configure it. You would typically memomize it | |
# as well. With this, you can use a more compact let() syntax. | |
# (Note: This code will only work in Rails 3) | |
module Let |
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
BackButton = Ext.extend(Ext.Button, { | |
ui: 'back', | |
text: 'Back', | |
hidden: true, | |
id: 'back', | |
handler: function() { | |
var dispatchOptions = this.backStack.pop(); | |
Ext.dispatch(dispatchOptions); | |
if(this.backStack.length == 0) { |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 cedmax <http://github.com/cedmax> | |
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 |
class Listing < ActiveRecord::Base | |
set_table_name :Listing | |
scope :near, lambda{ | |
|*args| | |
origin = *args.first[:origin] | |
if (origin).is_a?(Array) | |
origin_lat, origin_lng = origin | |
else | |
origin_lat, origin_lng = origin.latitude, origin.longitude |
# coderwall.coffee | |
# Display coderwall.com badges | |
username = "hermanjunge" | |
el = $(".coderwall") | |
$.getJSON "http://www.coderwall.com/#{username}.json?callback=?", (data) -> | |
el.empty() | |
for item in data.data.badges | |
$("<img>") | |
.attr( |
git config --global color.diff auto | |
git config --global color.status auto | |
git config --global color.branch auto |
// GET /COUNTRY/[COUNTRY_NAME] | |
{ | |
"opennet_filtering_data": { | |
"political": {"score": INT}, | |
"social": {"score": INT}, | |
"tools": {"score": INT}, | |
"conflict_security" : {"score": INT} | |
}, | |
"google_removal_requests": { |