no Homebrew required
$ cd /usr/local/src
$ curl -OL http://nginx.org/download/nginx-1.12.2.tar.gz
$ tar -xvzf nginx-1.12.2.tar.gz && rm nginx-1.12.2.tar.gz
1. Change rails version in Gemfile | |
> gem 'rails', '~> 5.1', '>= 5.1.4' | |
2. Remove Gemfile.lock | |
> git rm Gemfile.lock | |
3. Run bundle install command | |
> bundle install --jobs=5 | |
4. Run rails' app update to apply changes to app |
/* | |
Client wishes to emit a number of actions | |
Actions are identical RSAAs, with varying meta properties (usually the ID to request) | |
Ideal scenario | |
* Numerous actions are taken in within a timeout/debounce window | |
* After the timeout has expired, the actions are aggregated into a single API call | |
dispatch({ | |
type: "SOME_FETCH_REQUEST", |
numberToCurrency = (number, unit) => { | |
var precision = 1 | |
var delimiter = ' ' | |
var separator = ',' | |
// return '' if isNaN(number) or not number? | |
number = number.toFixed(~~precision) | |
var [i, f] = number.split('.') | |
var decimals = f > 0 ? separator + f : '' | |
return i.replace(/(\d)(?=(?:\d{3})+$)/g, '$1' + delimiter) + decimals + (unit || '') | |
} |
# createdb bench | |
require 'pg' | |
require 'active_record' | |
require 'benchmark' | |
require 'benchmark/ips' | |
ActiveRecord::Base.establish_connection( | |
adapter: 'postgresql', |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
by Jonathan Rochkind, http://bibwild.wordpress.com
Capistrano automates pushing out a new version of your application to a deployment location.
I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".
=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') |