ubuntu prerequisites
# Multiprecision arithmetic library developers tools, zlib
sudo apt-get install libgmp-dev zlib1g-dev -y
sudo -K
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| #!/bin/bash | |
| echo "Generating an SSL private key to sign your certificate..." | |
| openssl genrsa -des3 -out myssl.key 1024 | |
| echo "Generating a Certificate Signing Request..." | |
| openssl req -new -key myssl.key -out myssl.csr | |
| echo "Removing passphrase from key (for nginx)..." | |
| cp myssl.key myssl.key.org | |
| openssl rsa -in myssl.key.org -out myssl.key |
| var fs = require('fs'); | |
| var system = require('system'); | |
| var url = system.args[1]; | |
| var page = require('webpage').create(); | |
| page.settings.userAgent = 'Baiduspider'; | |
| page.open(url, function () { | |
| try { | |
| fs.write(system.args[2], page.content, 'w'); |
| class String | |
| def black; "\033[30m#{self}\033[0m" end | |
| def red; "\033[31m#{self}\033[0m" end | |
| def green; "\033[32m#{self}\033[0m" end | |
| def brown; "\033[33m#{self}\033[0m" end | |
| def blue; "\033[34m#{self}\033[0m" end | |
| def magenta; "\033[35m#{self}\033[0m" end | |
| def cyan; "\033[36m#{self}\033[0m" end | |
| def gray; "\033[37m#{self}\033[0m" end | |
| def bg_black; "\033[40m#{self}\033[0m" end |
| IFS=' | |
| ' | |
| if [ "$1" = "-b" ]; then | |
| if [ "$2" = "-t" ]; then | |
| git for-each-ref --sort=-committerdate refs/heads/ | |
| fi | |
| elif [ "$1" = "-c" ];then | |
| if [ "$2" = "-p" ];then | |
| git checkout - | |
| elif [ "$2" = "-f" ]; then |
| [ | |
| { "keys": ["ctrl+shift+alt+s"], "command": "save_all" }, | |
| { "keys": ["ctrl+shift+."], "command": "erb" }, | |
| { "keys": ["f5"], "command": "refresh_folder_list" }, | |
| { "keys": ["ctrl+alt+shift+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}}, | |
| { "keys": ["ctrl+shift+o"], "command": "prompt_open_folder" }, | |
| { "keys": ["ctrl+shift+alt+s"], "command": "expand_tabs" }, | |
| { "keys": ["ctrl+shift+alt+t"], "command": "unexpand_tabs" }, | |
| { "keys": ["ctrl+shift+alt+4"],"command": "set_setting", "args": {"setting": "tab_size", "value": 4}, "caption": "Tab Width: 4", "checkbox": true }, | |
| { "keys": ["ctrl+shift+alt+2"],"command": "set_setting", "args": {"setting": "tab_size", "value": 2}, "caption": "Tab Width: 2", "checkbox": true } |
| { | |
| "folder_exclude_patterns": | |
| [ | |
| ".svn", | |
| ".git", | |
| ".hg", | |
| "CVS" | |
| ], | |
| "font_size": 11, | |
| "ignored_packages": |
| #!/bin/bash | |
| # Check if user is root | |
| if [ $(id -u) != "0" ]; then | |
| echo "Error: You must be root to run this script, please use root to install the software." | |
| exit 1 | |
| fi | |
| apt-get remove libtidy-0.99-0 tidy | |
| apt-get install git-core automake libtool checkinstall |
| wget -N http://chromedriver.storage.googleapis.com/2.10/chromedriver_linux64.zip -P ~/Downloads | |
| unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads | |
| chmod +x ~/Downloads/chromedriver | |
| sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver | |
| sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver | |
| sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver |