This file contains hidden or 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
create ltm pool pool-vip-80-url1 | |
modify ltm pool pool-vip-80-url1 members add { 1.1.1.1:80 { session disabled state down } } | |
modify ltm pool pool-vip-80-url1 monitor http | |
modify ltm pool pool-vip-80-url1 { members add { ip:port } } | |
create ltm pool pool-vip-80-url2 | |
modify ltm pool pool-vip-80-url2 members add { 1.1.1.1:80 { session disabled state down } } | |
modify ltm pool pool-vip-80-url2 monitor http | |
modify ltm pool pool-vip-80-url2 { members add { ip:port } } |
This file contains hidden or 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
# http vip | |
create ltm virtual vs-vip-80 destination 192.168.199.111:http | |
modify ltm virtual vs-vip-80 { profiles replace-all-with { tcp { } } } | |
modify lmt virtual vs-vip-80 { profiles add { http } } | |
modify ltm virtual vs-vip-80 { pool pool-vip-80 } |
This file contains hidden or 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
# default pool | |
create ltm pool pool-vip-80 | |
modify ltm pool pool-vip-80 members add { 1.1.1.1:80 { session disabled state down } } | |
modify ltm pool pool-vip-80 monitor http | |
# let' add some cloud servers manually | |
modify ltm pool pool-vip-80 { members add { 10.208.1.1:80 } } | |
# use the Rackconnect metadata feature |
This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
cd ~/mongo-course/week1/homework# | |
# python hw1-2.21394489c9ad.py | |
The answer to Homework One, Problem 2 is 1815 | |
# python hw1-3.e594fc84d4ac.py | |
Bottle v0.11.6 server starting up (using WSGIRefServer())... | |
Listening on http://localhost:8080/ | |
Hit Ctrl-C to quit. |
This file contains hidden or 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
# extract the hw1 archive file | |
# change to the directory | |
$ ls | |
root@mongo2:~/hw1# ls -la | |
total 24 | |
drwxrwxr-x 3 root root 4096 Dec 18 23:57 . | |
drwxr-xr-x 11 root root 4096 Dec 18 23:57 .. | |
drwxr-xr-x 3 root root 4096 Feb 12 2013 dump | |
-rw-r--r-- 1 root root 598 Mar 27 2013 hw1-2.py | |
-rw-r--r-- 1 root root 2584 Dec 18 23:51 hw1-2.py.html |
This file contains hidden or 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
aptitude install git | |
aptitude install gcc | |
aptitude install python-dev | |
aptitude install python-pip | |
pip install pymongo | |
pip install bottle |
This file contains hidden or 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
$ ssh-keygen | |
Generating public/private rsa key pair. | |
Enter file in which to save the key (/root/.ssh/id_rsa): | |
$ cd .ssh | |
mv id_rsa.pub id_rsa_auxiliary.pub | |
mv id_rsa id_rsa_auxiliary | |
# http://rtomaszewski.blogspot.co.uk/2013/10/home-directory-and-dotfiles-management.html | |
# https://github.com/rtomaszewski/dotfiles/blob/master/.bashrc_rado_aux |
This file contains hidden or 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
# (1) Example can be found here | |
# https://github.com/rtomaszewski/dotfiles | |
# (2) | |
#alias homeshick="source $HOME/.homesick/repos/homeshick/bin/homeshick.sh" | |
git clone git://github.com/andsens/homeshick.git $HOME/.homesick/repos/homeshick | |
source $HOME/.homesick/repos/homeshick/homeshick.sh | |
# (3) | |
homeshick clone rtomaszewski/dotfiles |
This file contains hidden or 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/bash | |
TESTS[0]=a,b,c | |
TESTS[1]=1,2,3 | |
for row in "${TESTS[@]}"; do | |
IFS="," | |
set $row | |
col1=$1 | |
col2=$2 |