Run rails new --help to see all of the options you can use to create a new Rails application:
Output for Rails 8+
Usage:
rails COMMAND [options]
You must specify a command:
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
Run rails new --help to see all of the options you can use to create a new Rails application:
Output for Rails 8+
Usage:
rails COMMAND [options]
You must specify a command:
| \pset null 'NULL' | |
| \set HISTFILE ~/.psql_history- :HOST - :DBNAME | |
| \set HISTSIZE 100000 | |
| \timing | |
| \set PROMPT1 '(%n@%M:%>) [%/] > ' | |
| \set PROMPT2 '' | |
| \encoding unicode | |
| \timing | |
| \pset pager always | |
| \setenv LESS '-iMSsx2 -FX' |
| M[16],X=16,W,k;main(){T(system("stty cbreak") | |
| );puts(W&1?"WIN":"LOSE");}K[]={2,3,1};s(f,d,i | |
| ,j,l,P){for(i=4;i--;)for(j=k=l=0;k<4;)j<4?P=M | |
| [w(d,i,j++)],W|=P>>11,l*P&&(f?M[w(d,i,k)]=l<< | |
| (l==P):0,k++),l=l?P?l-P?P:0:l:P:(f?M[w(d,i,k) | |
| ]=l:0,++k,W|=2*!l,l=0);}w(d,i,j){return d?w(d | |
| -1,j,3-i):4*i+j;}T(i){for(i=X+rand()%X;M[i%X] | |
| *i;i--);i?M[i%X]=2<<rand()%2:0;for(W=i=0;i<4; | |
| )s(0,i++);for(i=X,puts("\e[2J\e[H");i--;i%4|| | |
| puts(""))printf(M[i]?"%4d|":" |",M[i]);W-2 |
| class GroupersController < ApplicationController::Base | |
| def create | |
| @grouper = Grouper.new(leader: current_member) | |
| if @grouper.save | |
| confirm_grouper_via_emails(@grouper) | |
| enqueue_bar_assignment(@grouper) | |
| redirect_to home_path | |
| else |
| // 1. Go to page https://www.linkedin.com/settings/email-frequency | |
| // 2. You may need to login | |
| // 3. Open JS console | |
| // ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers)) | |
| // 4. Copy the following code in and execute | |
| // 5. No more emails | |
| // | |
| // Bookmarklet version: | |
| // http://chengyin.github.io/linkedin-unsubscribed/ |
| # Capistrano Laravel 4 Deployment Tasks | |
| # Watts Martin (layotl at gmail com) | |
| # https://gist.github.com/chipotle/5506641 | |
| # updated 14-Aug-2013 | |
| # Assumptions: | |
| # | |
| # - You are using a .gitignore similar to Laravel's default, so your | |
| # vendor directory and composer(.phar) are *not* under version control | |
| # - Composer is installed as an executable at /usr/local/bin/composer |
| require 'minitest_helper' | |
| feature 'User Login Test' do | |
| background do | |
| Rails.application.config.authentication_domain = 'user.com' | |
| OmniAuth.config.test_mode = true | |
| OmniAuth.config.mock_auth[:google_oauth2] = OmniAuth::AuthHash.new( | |
| { 'provider' => 'google_oauth2', 'uid' => '12334', | |
| 'info' => { 'name' => 'Test user', 'email' => 'test@user.com' } | |
| } |
I've just gotten back from the awesome mloc.js conference. There was a talk about compiling C# to JavaScript and one of the benefits explained was static types. Someone from the audience asked, who needs types when you do Test Driven Development?
I tried to address the question in my talk on Roy but I talked to some developers afterwards and they thought that TDD
| a = File.read './legal.txt' | |
| b = a.force_encoding("ISO-8859-1").encode("utf-8", replace: nil).scan(/inicio([\s\S]+?)fin/) | |
| c = [] | |
| b.each do |r| | |
| d = {} | |
| d[:fecha] = r.to_s.scan(/Lima, el (.+?),/).join |