A simple acceptance test for the RailsGirls Ideas App.
Add the following lines to your Gemfile:
gem 'rspec-rails'
gem 'capybara'
/* | |
macOS fork bug reproducer for https://github.com/golang/go/issues/33565 | |
cc -o fork-leak fork-leak.c | |
while true; do sh -c 'exec ./fork-leak 1 $$'; done | |
In another terminal, run: | |
while sleep 2; do pgrep fork-leak; done |
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"time" | |
) | |
func main() { |
LDFLAGS = -ltag | |
test: all | |
./enumeration_order | |
./mp4-loop mp4.m4a | |
all: mp4-loop enumeration_order | |
mp4-loop: mp4-loop.cpp |
# drbd8-utils does not match the drbd kernel module so we need to compile from source | |
# install dependencies | |
sudo apt-get install autoconf gcc flex make git-core xsltproc # xsltproc is for the manpages | |
# check the DRBD kernel module version | |
cat /proc/drbd | |
# clone | |
cd /tmp && git clone -b drbd-8.4.2 git://git.drbd.org/drbd-8.4.git # assuming kernel module for DRBD 8.4.2 |
class Flattener | |
def initialize(separator='_') | |
@separator = separator | |
end | |
def flatten(hash, prefix=nil) | |
Enumerator.new do |yielder| | |
hash.each do |key, value| | |
raise "Bad key: #{key.inspect}" unless key.is_a?(String) | |
key = [prefix, key].join(@separator) if prefix |
vagrant@lucid32:~/taglib-ruby$ uname -a | |
Linux lucid32 2.6.32-38-generic #83-Ubuntu SMP Wed Jan 4 11:13:04 UTC 2012 i686 GNU/Linux | |
vagrant@lucid32:~/taglib-ruby$ | |
vagrant@lucid32:~/taglib-ruby$ git log -1 | |
commit bbbdb3b7f7016c8351d9e4d8787c2bdef3d18b9f | |
Author: Robin Stocker <[email protected]> | |
Date: Sat Sep 29 16:32:36 2012 +0200 | |
Add building section to contributing |
A simple acceptance test for the RailsGirls Ideas App.
Add the following lines to your Gemfile:
gem 'rspec-rails'
gem 'capybara'
Copyright (c) 2012 Robert Beekman | |
MIT License | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to |
Remapping CAPS LOCK to Control also has benefits outside of the terminal in OS X (10.7).
OS X's terminal becomes a much happier place if you remap CAPS LOCK to the Control key, and if you enable the Option key. One downside of this, which applies only in Terminal.app, is that you can no longer enter symbols which can only be
git diff --name-only | uniq | xargs mvim
When git encounters a merge conflict, e.g. during a rebase, it drops you back into the shell with a dirty working directory. I like this one-liner for opening all files with a merge conflict in MacVim.
Once you're in Vim, you can then switch between the files with :n
and :prev
, or another favourite: :w | n
(save current file and open the next command line-supplied file).
UPDATE: see below for a version that works with real terminal commands.