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
#!/bin/sh | |
git filter-branch --env-filter ' | |
an="$GIT_AUTHOR_NAME" | |
am="$GIT_AUTHOR_EMAIL" | |
cn="$GIT_COMMITTER_NAME" | |
cm="$GIT_COMMITTER_EMAIL" | |
if [ "$GIT_COMMITTER_EMAIL" = "[email protected]" ] |
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
diff -ruN nginx-0.8.4_orig/auto/make nginx-0.8.4_syslog/auto/make | |
--- nginx-0.8.4_orig/auto/make 2009-05-12 20:15:43.000000000 +0700 | |
+++ nginx-0.8.4_syslog/auto/make 2009-07-08 16:32:06.000000000 +0700 | |
@@ -15,6 +15,10 @@ | |
ngx_objs_dir=$NGX_OBJS$ngx_regex_dirsep | |
ngx_use_pch=`echo $NGX_USE_PCH | sed -e "s/\//$ngx_regex_dirsep/g"` | |
+#SYSLOG | |
+if [[ "${USE_SYSLOG}" == "YES" ]]; then | |
+ CFLAGS="$CFLAGS -DUSE_SYSLOG" |
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
> rails g scaffold User name:string description:string | |
# factories.rb | |
Factory.sequence :name do |i| | |
"Test User #{i}" | |
end | |
Factory.define :user do |u| | |
u.name { Factory.next :name } | |
u.description 'This is my description' |
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 /^I do something$/ do | |
# something | |
end | |
When /^I do something complex$/ do | |
When "I do something" # call the other step | |
# something else | |
end |
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
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
export PS1='\h:\W$(__git_ps1 "[\[\e[0;32m\]%s\[\e[0m\]\[\e[0;33m\]$(parse_git_dirty)\[\e[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
# for .zshrc git branch | |
autoload -U colors && colors | |
parse_git_branch() { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
setPrompt() { | |
PS1="%{$fg[cyan]%}%n%{$fg[magenta]%}@%{$fg[red]%}%m%{$fg[cyan]%}$(parse_git_branch)%{$fg[magenta]%}%#%{$reset_color%} " |
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
btaitelb@grew (master)% bundle exec cucumber --backtrace | |
Using the default profile... | |
F------FF-----F | |
Failing Scenarios: | |
cucumber features/test_post.feature:4 # Scenario: Post Test Success | |
cucumber features/test_post.feature:13 # Scenario: Post Test Failure | |
2 scenarios (2 failed) | |
11 steps (11 skipped) |
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
Given /^an? (.+) exists with (?:an? )?(.+) (?:of )?\"([^\"]*)\"$/ do |model, field, value| | |
factory_name = model.gsub(' ', '_').to_sym | |
eval("@#{factory_name} = Factory.create(factory_name, field => value)") | |
end |
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 /^(?:|I )fill in "([^\"]*)" with the (?:the )?(.+)\'s "([^\"]+)"(?: within "([^\"]*)")?$/ do |field, model, attrib, selector| | |
with_scope(selector) do | |
factory_name = model.gsub(' ', '_').to_sym | |
object = eval("@#{factory_name}") | |
fill_in(field, :with => object.send(attrib)) | |
end | |
end |
OlderNewer