root@host1:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
10.0.2.0 * 255.255.255.0 U 0 0 0 eth0
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 completion | |
source /usr/local/etc/bash_completion.d/git-completion.bash | |
source /usr/local/etc/bash_completion.d/git-prompt.sh | |
# unstaged (*) and staged (+) changes | |
# export GIT_PS1_SHOWDIRTYSTATE=1 | |
# If something is stashed, then a '$' will be shown next to the branch name | |
# export GIT_PS1_SHOWSTASHSTATE=1 |
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 TestSuite: | |
@patch('real_class_name') | |
def test_case(self, mock_class): | |
# Delay the evaluation of Mock() so that we get | |
# a new mock object for each time the (mocked) | |
# class constructor is called. | |
def new_mock_obj(*args, **kwargs): | |
mock_obj = Mock() | |
mock_obj.some_function.return_value = 'w00t' |
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
demo: | |
provider: openstack | |
auth_service: | |
name: identity | |
host_uri: http://192.168.42.11:5000 | |
request: create_token | |
validator: list_tenants | |
api_version: v3 |
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
kind: List | |
apiVersion: v1beta3 | |
items: | |
- kind: ReplicationController | |
apiVersion: v1beta3 |
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 $ " |
OlderNewer