Version: 1.9.8
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
| scp [email protected]:/db/mysql/log/slow_query.log ~/Downloads | |
| ruby ~/SlowQueryLogParser.rb ~/Downloads/slow_query.log number > ~/Downloads/slow_query_formatted.log | |
| mate ~/Downloads/slow_query_formatted.log |
| // ActiveTable - a bookmarklet to make tables sortable and editable | |
| function init() { | |
| var aHrows = getHrows(); | |
| var numHrows = aHrows.length; | |
| var aHidden = getHiddenColumns(); | |
| ATpopup = document.createElement("div"); | |
| ATpopup.style.cssText = "position: absolute; visibility: hidden; padding: 0; font-family: Arial; background-color: rgba(255, 255, 255, 0.9); border-radius: .5em; text-align: center; box-shadow: .05em .05em .5em #00C;"; | |
| ATpopup.innerHTML = "<a href='sort' title='sort' onclick='sortColumn(); return false'><img border=0 src='http://stevesouders.com/images/sort_up_down.png' style='padding-top: 0.2em;'></a><br><a href='hide' style='color: #C00; font-family: monospace; font-size: 1.5em; text-decoration: none;' title='hide' onclick='hideColumn(); return false'>x</a>"; // TODO - use protocol-less URL for img |
| #ack is a tool like grep, designed for programmers with large trees of heterogeneous source code | |
| #to install ack, see http://betterthangrep.com/ | |
| #to use ack, launch terminal (mac osx) and type 'ack <some_keywords>' | |
| #ack will search all files in the current directory & sub-directories | |
| #here's how I have my config file setup. this file is located on mac osx here | |
| # ~/.ackrc | |
| # Always sort the files |
| #Model | |
| @user.should have(1).error_on(:username) # Checks whether there is an error in username | |
| @user.errors[:username].should include("can't be blank") # check for the error message | |
| #Rendering | |
| response.should render_template(:index) | |
| #Redirecting | |
| response.should redirect_to(movies_path) |
| =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') |