Skip to content

Instantly share code, notes, and snippets.

View mrkcor's full-sized avatar

Mark Cornelissen mrkcor

View GitHub Profile
#!/usr/bin/env ruby
# Using this script as your post-receive hook will update mirrors using git
# push --mirror. To make this work you have to ensure that access is taken
# care of (for example by setting up .ssh/config with an SSH key for the
# user that runs the hook).
#
# To use this script populate /home/git/git-mirrors.yml with YAML like so:
# ---
# user/repo1.git:
Vagrant.configure("2") do |config|
# Enable SSH agent forwarding, by running the ensure_ssh_auth_sock script on its own the following scripts have their environment setup properly
config.ssh.forward_agent = true
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__), "scripts", "ensure_ssh_auth_sock")
# Grab my dotfiles and set them up
config.vm.synced_folder File.expand_path("~/.dotfiles"), "/home/vagrant/.dotfiles"
config.vm.provision :shell, :path => File.join(File.dirname(__FILE__), "scripts", "mkremer")
end
@mrkcor
mrkcor / test_me_test.rb
Created February 21, 2012 06:31
MiniTest::Spec example with both before do and setup
require_relative 'test_helper'
class TestMe
end
module TestModule
def setup
puts "This is the setup method"
end
end
@mrkcor
mrkcor / gist:1415722
Created December 1, 2011 10:42
Example
class Animal
def initialize(species)
@species = species
end
def species
@species
end
end
@mrkcor
mrkcor / dog.rb
Created December 1, 2011 10:34
Example
class Dog
def bark
puts "Woof"
end
end
class Dog
def name=(name)
@name = name
end