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
<div id="main"/> | |
<script type="text/jsx"> | |
/** @jsx React.DOM */ | |
var DragItem = React.createClass({ | |
drag: function(ev) { | |
ev.dataTransfer.setData("draggedItem", JSON.stringify(this.props.item)); | |
}, | |
render: function () { | |
return (<div draggable="true" onDragStart={this.drag} className="item">{this.props.item.text}</div>); | |
} |
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
user=> (ns there) | |
nil | |
there=> (defmulti ^:private doit identity) | |
#'there/doit | |
there=> (defmethod doit 1 [x] x) | |
#<MultiFn clojure.lang.MultiFn@d2de489> | |
there=> (doit 1) | |
1 | |
there=> (in-ns 'user) | |
#<Namespace user> |
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
gemcutter => redis downloads spec | |
================================= | |
keys | |
---- | |
downloads => global counter for all gem downloads | |
downloads:today => sorted set for downloads from today | |
downloads:rubygem:rails => counter for all rails downloads | |
downloads:version:rails-2.3.5 => counter for all rails 2.3.5 downloads |
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
task :deploy => ['deploy:push', 'deploy:restart', 'deploy:tag'] | |
namespace :deploy do | |
task :migrations => [:push, :off, :migrate, :restart, :on, :tag] | |
task :rollback => [:off, :push_previous, :restart, :on] | |
task :push do | |
puts 'Deploying site to Heroku ...' | |
puts `git push heroku` | |
end |
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 'formula' | |
class TmuxIterm2 < Formula | |
url 'http://iterm2.googlecode.com/files/tmux-for-iTerm2-20120203.tar.gz' | |
md5 '59305a26bdd0245054fe719e6b2a960e' | |
homepage 'http://code.google.com/p/iterm2/downloads/detail?name=tmux-for-iTerm2-20120203.tar.gz&can=2&q=' | |
depends_on 'libevent' | |
def install |
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 BitArray | |
width: 24 | |
constructor: (size=24, default_value = 0) -> | |
@size = size | |
initialElements = Math.floor(size / @width) + 1 | |
@field = [] | |
for i in [0...initialElements] | |
@field[i] = 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
(ns statsd-clj.server | |
(:use [aleph.udp] | |
[gloss core io] | |
[lamina core api]) | |
(:require [statsd-clj.config :as config] | |
[statsd-clj.metrics :as metrics] | |
[clojure.tools.logging :as log])) | |
(def socket-server (agent nil)) |
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
{ | |
"auto_indent": true, | |
"auto_match_enabled": true, | |
"caret_style": "smooth", | |
"close_windows_when_empty": true, | |
"color_scheme": "Packages/Theme - Aqua/Color Schemes/Tomorrow Night Aqua.tmTheme", | |
"detect_indentation": true, | |
"dictionary": "Packages/Language - English/en_US.dic", | |
"draw_centered": false, | |
"draw_indent_guides": 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'cocoapods-core' | |
require 'json' | |
require 'mechanize' | |
require 'rest-client' | |
docs = JSON.parse(RestClient.get('http://cocoadocs.org/documents.jsonp')[12..-22]) |
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
//-----------------------------------------------// | |
// RTC DS1307 LIBRARY FOR SPARK CORE // | |
//===============================================// | |
// Copy this into a new application at: // | |
// https://www.spark.io/build and go nuts! // | |
// !! Pinouts on line 254 below !! // | |
//-----------------------------------------------// | |
// Technobly / BDub - Jan 12th 2014 // | |
//===============================================// | |
#pragma GCC diagnostic ignored "-Wunused-but-set-variable" |
OlderNewer