brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
| =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') |
| <?php | |
| try { | |
| // Get UID of the user | |
| $uid = $this->fb->getUser(); | |
| // Get basic info about the user | |
| $me = $this->fb->api('/me'); | |
| // Get the user's facebook stream |
| #!/usr/bin/env bash | |
| # Generates gource video (h.264) out of multiple repositories. | |
| # Pass the repositories in command line arguments. | |
| # Example: | |
| # <this.sh> /path/to/repo1 /path/to/repo2 | |
| RESOLUTION="1600x1080" | |
| outfile="gource.mp4" | |
| i=0 |
| # in features/support/env.rb | |
| require 'selenium/webdriver' | |
| # we need a firefox extension to start intercepting javascript errors before the page | |
| # scripts load | |
| Capybara.register_driver :selenium do |app| | |
| profile = Selenium::WebDriver::Firefox::Profile.new | |
| # see https://github.com/mguillem/JSErrorCollector | |
| profile.add_extension File.join(Rails.root, "features/support/extensions/JSErrorCollector.xpi") | |
| Capybara::Selenium::Driver.new app, :profile => profile |
| #!/bin/bash | |
| # PHP CodeSniffer pre-commit hook for git | |
| # | |
| # @author Soenke Ruempler <[email protected]> | |
| # @author Sebastian Kaspari <[email protected]> | |
| # | |
| # see the README | |
| PHPCS_BIN=/usr/bin/phpcs | |
| PHPCS_CODING_STANDARD="$(git rev-parse --show-toplevel)/doc/CodeStandard.xml" |
| <?php | |
| //Drop-in replacement for PHP's SoapClient class supporting connect and response/transfer timeout | |
| //Usage: Exactly as PHP's SoapClient class, except that 3 new options are available: | |
| // timeout The response/transfer timeout in milliseconds; 0 == default SoapClient / CURL timeout | |
| // connecttimeout The connection timeout; 0 == default SoapClient / CURL timeout | |
| // sslverifypeer FALSE to stop SoapClient from verifying the peer's certificate | |
| class SoapClientTimeout extends SoapClient | |
| { | |
| private $timeout = 0; | |
| private $connecttimeout = 0; |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
| #!/usr/bin/php | |
| <?php | |
| print_r($argv); | |
| if (count($argv) < 3) { | |
| die("wrong number of arguments\n"); | |
| } |
| #!/bin/bash | |
| for file in `find .` | |
| do | |
| EXTENSION="${file##*.}" | |
| if [ "$EXTENSION" == "php" ] || [ "$EXTENSION" == "phtml" ] | |
| then | |
| RESULTS=`php -l $file` |