cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git://github.com/jashkenas/coffee-script-tmbundle CoffeeScript
git clone https://github.com/miksago/jade-tmbundle.git Jade
git clone https://github.com/LearnBoost/stylus.git Stylus
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
=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') |
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
# installing curb gem on Ubuntu require libcurl | |
sudo apt-get install libcurl3-dev | |
Or new version, but it conflicts if some libraries. | |
sudo apt-get install libcurl4-dev | |
(some other packages libcurl4-openssl-dev libcurl4-gnutls-dev) | |
gem install curb |
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
/usr/sbin/update-rc.d -f unicorn defaults | |
chmod +x /etc/init.d/unicorn | |
/usr/sbin/update-rc.d -f unicorn remove |
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
brew install qt | |
brew install cmake | |
# Change 4.8.0 to the QT version installed | |
for DIR in /usr/local/Cellar/qt/4.8.0/lib/*.framework; do | |
ln -s $DIR/Headers ${DIR%%/lib/*}/include/$(basename $DIR .framework); | |
done | |
gem install qtbindings |
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
# First attempting to use Capybara directly, you will ran into issues when trying to set HTTP header. | |
# Using Basic HTTP Authentication requires that we needed to set the header. | |
# Also we need to set the Content-Type and Accept headers to ensure that Rails handles the input and output correctly. | |
# When using Rack, Capybara delegates request and response handling down to Rack::Test. | |
# So I used Rack::Test directly in my step definitions, and it works. | |
# Rack::Test has a module called Rack::Test::Methods that can be mixed into a class to provide it | |
# with methods for get, post, put, delete as well as last_request, last_response, header and more. | |
# I mixed Rack::Test::Methods into the Cucumber world at the top of our API steps file like so: | |
############################## |
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
(eval-after-load "hideshow" | |
'(add-to-list 'hs-special-modes-alist | |
`(ruby-mode | |
,(rx (or "def" "class" "module" "{" "[")) ; Block start | |
,(rx (or "}" "]" "end")) ; Block end | |
,(rx (or "#" "=begin")) ; Comment start | |
ruby-forward-sexp nil))) |
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
$ wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2 | |
$ tar xvjf wkhtmltopdf-0.9.9-static-amd64.tar.bz2 | |
$ mv wkhtmltopdf-amd64 /usr/bin/wkhtmltopdf | |
// In case you got the issue | |
// wkhtmltopdf: error while loading shared libraries: | |
// libfontconfig.so.1: cannot open shared object file: No such file or directory | |
// | |
// run the command below: | |
$ yum install urw-fonts libXext libXrender fontconfig libfontconfig.so.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
CarrierWave.configure do |config| | |
if Rails.env.development? || Rails.env.test? | |
config.storage = :file | |
else | |
config.storage = :fog | |
config.fog_credentials = { | |
:provider => 'OpenStack', | |
:openstack_auth_url => 'https://auth.selcdn.ru/v1.0', | |
:openstack_username => Rails.application.secrets.openstack_username, | |
:openstack_api_key => Rails.application.secrets.openstack_api_key |
OlderNewer