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
yum update | |
yum groupinstall ‘Development Tools’ | |
yum install readline-devel zlib zlib-devel openssl-devel perl cpio expat-devel gettext-devel | |
mkdir src | |
cd src | |
wget http://www.codemonkey.org.uk/projects/git-snapshots/git/git-latest.tar.gz | |
tar xzvf git-latest.tar.gz | |
cd git-{date} |
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
# All .feature files begin with a feature declaration | |
# such as the one below. The description is optional | |
# and can be made up of arbitrary text. Multiple | |
# paragraphs are also allowed | |
Feature: Withdraw Cash | |
This feature allows an account holder to withdraw | |
cash from an ATM. | |
# The background lists a set of assumptions that | |
# will be applied to each scenario and scenario |
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: Create a User | |
Background: | |
* Clarice is a system administrator | |
* Dave is an ordinary user | |
Scenario Outline: | |
Given <User> is logged in | |
When she tries to create a user | |
Then the new user will <Be Created or Not> |
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
Scenario Outline: Create a user with certain attributes | |
Given I am authorized to create users in the system | |
And a user with username <Username> does not exist in the system | |
When I create a user with attributes <Username>, <Email>, <Password>, and <Password Confirmation> | |
Then the user will be <Created or Not> | |
Examples: Valid User Attributes | |
| Username | Email | Password | Password Confirmation | Created or Not | | |
| astark | astark@gmail.com | fkd2350a | fkd2350a | Created | | |
| astark | astark@gmail.com | ++afd]3b | ++afd]3b | Created | |
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
source ~/.git-completion.sh | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
NORMAL="\[\033[m\]" | |
PS1="$GREEN\w$YELLOW\$(__git_ps1)$NORMAL $ " |
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
>>> from my_klass import my_klass | |
>>> from mocker import Mocker | |
>>> mocker = Mocker() | |
# Prepare the mock methods | |
>>> target = mocker.mock() | |
>>> target.method1(12) # doctest: +ELLIPSIS | |
<mocker.Mock object at ...> | |
>>> mocker.result(5) | |
>>> target.method2(12) # doctest: +ELLIPSIS |
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
GIT_VERSION=`git --version | awk '{print $3}'` | |
URL="https://raw.github.com/git/git/v$GIT_VERSION/contrib/completion/git-completion.bash" | |
PROFILE="$HOME/.bash_profile" | |
echo "Downloading git-completion for git version: $GIT_VERSION..." | |
if ! curl "$URL" --silent --output "$HOME/.git-completion.bash"; then | |
echo "ERROR: Couldn't download completion script. Make sure you have a working internet connection." && exit 1 | |
fi |
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
require 'formula' | |
class Dblatex < Formula | |
url 'http://downloads.sourceforge.net/project/dblatex/dblatex/dblatex-0.3/dblatex-0.3.tar.bz2' | |
homepage 'http://dblatex.sourceforge.net' | |
md5 '7de6bf72b8b2934169ce0ec911e966ed' | |
def install | |
system "python", "setup.py", "install", "--prefix=#{prefix}", "--install-scripts=#{bin}" | |
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
module Aviator | |
define_request :create_tenant do | |
meta :provider, :openstack | |
meta :service, :identity | |
meta :api_version, :v2 | |
meta :endpoint_type, :admin | |
link 'documentation', |
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
#!/usr/bin/env ruby | |
class Fixnum | |
def +(other) | |
2 | |
end | |
end | |
puts 1 + 1 + 1 |
OlderNewer