Skip to content

Instantly share code, notes, and snippets.

@andyvanee
andyvanee / Rakefile
Created September 21, 2011 16:19
Rake migrate without rails
require 'active_record'
require 'yaml'
require 'mysql'
require 'logger'
task :default => :migrate
desc "Migrate the database through scripts in db/migrate. Target specific version with VERSION=x"
task :migrate => :environment do
ActiveRecord::Migrator.migrate('db/migrate', ENV["VERSION"] ? ENV["VERSION"].to_i : nil )
@jakzal
jakzal / BehatTest.php
Created October 19, 2011 14:47
Running Behat in PHPUnit to calculate code coverage
<?php
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Behat\BehatBundle\Command\BehatCommand;
class BehatTest extends KernelAwareTest
{
/**
@jedi4ever
jedi4ever / gist:c910b487f515a07a488c
Created March 30, 2015 10:02
coreos cloudinit for etcd/fleet/consul/registrator/ambassador
#cloud-config
write_files:
- path: /etc/systemd/system/docker.service.d/increase-ulimit.conf
owner: core:core
permissions: 0644
content: |
[Service]
LimitMEMLOCK=infinity
- path: /etc/ntp.conf