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
<foods> | |
<veggies> | |
<veggie> | |
<name>carrot</name> | |
<color>orange</color> | |
<tags> | |
<tag>juicing</tag> | |
<tag>raw</tag> | |
<tag>roasted</tag> | |
</tags> |
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
Feature: Manage Contact | |
In order to easily reference individuals and start communications with them | |
As a workshop co-ordinator | |
I want to manage contact information | |
Scenario: View list of contacts | |
Scenario: Email a contact from list | |
Scenario: Add a new contact |
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
## manage_contact.feature (cucumber scenario) ### | |
Scenario: View list of contacts | |
Given 3 contacts exist # Pickle makes this line possible | |
When I go to the contact list | |
Then I should see 3 contacts | |
## custom_steps.rb (cucumber step-definition) ### | |
Then /^(?:|I )should see (\d+) (.*)$/ do |count, selector| |
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
# Custom prompt with GIT branch label | |
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
NO_COLOUR="\[\033[0m\]" |
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
class MyClass | |
def say_hello | |
puts 'Hello Nick!' | |
end | |
end | |
# Reopen the class to override the say_hello method | |
MyClass.class_eval do |
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
# https://github.com/mxcl/homebrew/issues/23741 | |
mkdir: sys: File exists | |
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libgnu.a(u64.o) has no symbols | |
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libgnu.a(u64.o) has no symbols | |
xml.c:23:10: fatal error: 'libxml/tree.h' file not found | |
#include <libxml/tree.h> | |
^ | |
1 error generated. | |
make[1]: *** [xml.o] Error 1 | |
make[1]: *** Waiting for unfinished jobs.... |
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
# Using brew installed gcc49 and compiled Ruby using gcc49 therubyracer fails to build | |
# (it seems to build okay if Ruby is compiled with gcc42) | |
$ gem install therubyracer -v '0.12.0' | |
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. | |
/Users/nicholas/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb | |
checking for main() in -lpthread... yes | |
checking for main() in -lobjc... yes |
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
# when scp keeps crapping out (xfering really big files) | |
# if the connection is interrupted rerun command to pickup where you left off | |
rsync --partial --progress --rsh=ssh user@host:remote_file local_file |
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
/** | |
* Why does certain input result in weird character output rather than a list? | |
* (from the Exercise: Functions-1 - Pragprog Elixir book) | |
**/ | |
iex> pair_tuple_to_list = fn {a, b} -> [a, b] end | |
#Function<6.90072148/1 in :erl_eval.expr/5> | |
iex> pair_tuple_to_list.({1, 4}) | |
[1, 4] |
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
# /etc/newsyslog.d/rails_projects.conf | |
# to test run 'sudo newsyslog -nvv' | |
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] | |
/Users/nicholas/*/*/log/*.log nicholas:staff 644 0 * $W0D23 GZ |
OlderNewer