Run each chain:
$ ruby full_chain.rb
$ ruby half_chain.rb
$ ruby no_chain.rb
#!/bin/bash | |
thin start -p 3000 -R test.ru |
export PROJECTS=~/wuaki/ | |
function cs { | |
local dest current | |
mkdir -p "$PROJECTS" | |
cd "$PROJECTS/$1" | |
} | |
function _cs_scandir |
int main(int argc, char *argv[]) | |
{ | |
int *array, i; | |
array = malloc(sizeof(int) * 100); | |
memset((void *)array, 0, sizeof(int) * 100); | |
*(array + sizeof(int) * 30) = 4; | |
for(i = 0; i < 100; i++) { | |
int value; | |
value = *(array + sizeof(int) * i); |
#!/usr/bin/env ruby | |
# | |
# Git commit-msg hook. If your branch name is in the form "username/vod-45-new-feature" | |
# it automatically adds the prefix "[VOD-45]" to commit | |
# messages. | |
# | |
# Example | |
# ======= | |
# | |
# git checkout -b bob/vod-45-some-cool-feature |
(defun copy-buffer () | |
"Copy buffer to clipboard" | |
(clipboard-kill-ring-save (point-min) (point-max))) | |
(defun git-changelog () | |
(interactive) | |
(shell-command "git --no-pager log --no-merges --pretty=format:'- %s' `git describe --abbrev=0 --tags`.." "*changelog*") | |
(switch-to-buffer "*changelog*") | |
(copy-buffer)) |
redis = require('redis') | |
client = redis.connect('127.0.0.1', 6379) | |
class RedisModel | |
@primary_key: "id" | |
@model: nil | |
@counters: {} | |
-- class methods | |
@counter: => |
module WuakiBackground | |
module DelayedTask | |
def self.include(base) | |
base.extend(ClassMethods) | |
end | |
module ClassMethods | |
def before_perform(*args) | |
_args = args.dup | |
options = _args.extract_options! |
require 'yaml' | |
require 'multi_json' | |
module MyApp | |
module Queue | |
extend self | |
def redis | |
MyApp.redis | |
end |
require 'delegate' | |
class GuestRole < SimpleDelegator | |
def books | |
Book.published | |
end | |
end | |
class AdminRole < SimpleDelegator | |
def books |