DB migrations without any adapter or ORM layer needed
Following a simplified version of the series by K. Scott Allen: http://blog.codinghorror.com/get-your-database-under-version-control/
With rollbacks added in.
#!/usr/bin/env sh | |
# loosely based on http://pastebin/D8y7prYV, except with windows not sessions | |
if [ ${#} -eq 3 ]; then | |
echo "You need to provide both a session and path" 2>&1 | |
exit 1 | |
fi | |
sess=${1} |
DB migrations without any adapter or ORM layer needed
Following a simplified version of the series by K. Scott Allen: http://blog.codinghorror.com/get-your-database-under-version-control/
With rollbacks added in.
# More or less direct translation of folktale.js data.task + control.async.parallel | |
# https://github.com/folktale/data.task/blob/master/lib/task.js | |
# https://github.com/folktale/control.async/blob/master/lib/core.js | |
module Monads | |
class Task | |
def self.of(x) | |
new {|_,res| res[x] } |
// A translation of Elm's StartApp to js + ramda + flyd | |
// for comparison see https://github.com/evancz/start-app/blob/2.0.1/src/StartApp.elm | |
// Comments welcome | |
var curry = require('ramda/src/curry'); | |
var map = require('ramda/src/map'); | |
var concat = require('ramda/src/concat'); | |
var reduce = require('ramda/src/reduce'); | |
var commute = require('ramda/src/commute'); |
# Usage | |
# ruby gsubs.rb './tests/**/*.rb' | |
ARGF.replace Dir[ARGV[0]] unless ARGV.empty? | |
require 'fileutils' | |
$GSUBS = \ | |
[ | |
[ /^(\s*)(.+)\.should\s+be_true/ , '\1assert \2' ], |
1. Two different uses for DelegateClass [newman-scheduler] | |
2. Array() top-level function works on any Enumerable |
1. Building a chainable lazy-iterator interface | |
2. |
1. The ruby singleton, Greg's current thinking | |
2. Writing your own enumerator generator for fun and profit | |
3. There once was a project named Computer Programming For Everyone |