Blog post here
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
# Public: generates a mixable singleton implementation dependent on a model key. | |
# Once you mix it into a model, your model gains an .instance method that will | |
# generate an object and cache it. Further calls to the .instance methods will | |
# return the same object. | |
# | |
# key - The name of the attribute we use to index instances. Defaults to "id". | |
# | |
# Example | |
# | |
# # Called without arguments uses the "id" as key. |
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 'minitest/unit' | |
require 'drb' | |
require 'rinda/tuplespace' | |
module MiniTest | |
class ParallelRunner < MiniTest::Unit | |
URI = 'druby://127.0.0.1:12345' | |
def _run_suites suites, type | |
hash = Hash[suites.map { |s| [s.name, s] }] |
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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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/sh | |
# Usage: . testlib.sh | |
# Simple shell command language test library. | |
# | |
# Tests must follow the basic form: | |
# | |
# begin_test "the thing" | |
# ( | |
# set -e | |
# echo "hello" |
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
<textarea style="height: 100%; width: 100%; background: #222; padding: 5% 25%; color: #eee;"></textarea> |
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
#define _GNU_SOURCE | |
#include <asm/bootparam.h> | |
#include <errno.h> | |
#include <fcntl.h> | |
#include <linux/kvm.h> | |
#include <linux/kvm_para.h> | |
#include <stdarg.h> | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
OlderNewer