Skip to content

Instantly share code, notes, and snippets.

View waterlink's full-sized avatar

Alex Fedorov waterlink

View GitHub Profile
xrandr --output DP2 --mode 1280x1024 --same-as eDP1 ; xrandr --output eDP1 --mode 1280x1024 --same-as DP2
@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
response.should render_template(:index)
response.should redirect_to(movies_path)
waterlink /
Last active December 30, 2015 18:59 — forked from liamdon/gist:2467603
Coffee + Jade for Sublime
### Step 1: Clone the bundles into your Sublime Text packages directory
cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git:// CoffeeScript
git clone Jade
git clone Stylus
### Step 2: Restart Sublime Text 2
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
RAILS_ENV=production rake db:setup
# produces the error's a no-worky
psql:/yourprojectpath/yourproject/db/structure.sql:29: ERROR: could not open extension control file "/usr/share/postgresql/9.1/extension/hstore.control": No such file or directory
# hstore postgresql extension needs to be installed, so....
sudo apt-get install postgresql-contrib
# now your extension should be available to enable so log in with psql
psql -d yourproject_production -U yourdbuser -W