Before must be installed this
Step #1
rails new project_name --skip-test-unit --database=postgresql
Step #2
cd project_name
| #!/bin/sh | |
| # Sublime Text 3 install with Package Control (last update: 25 August 2016) | |
| # | |
| # No need to download this script, just run it on your terminal: | |
| # | |
| # $ curl -L git.io/sublimetext | sh | |
| # | |
| # When you need to update Sublime Text, run this script again. |
Before must be installed this
Step #1
rails new project_name --skip-test-unit --database=postgresql
Step #2
cd project_name
| #!usr/bin/env/ruby-w | |
| require 'json' | |
| require 'open-uri' | |
| require 'optparse' | |
| #Author: Mateus Lino a.k.a Dctor | |
| #Site: https://mateuslino.com | |
| options = {:hash => nil} |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Capture Photo</title> | |
| <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"/> | |
| <script type="text/javascript" charset="utf-8" src="js/phonegap.js"></script> | |
| <script type="text/javascript" charset="utf-8"> | |
| var pictureSource; // picture source | |
| var destinationType; // sets the format of returned value |
| { | |
| "Acre": ["Acrel\u00e2ndia","Assis Brasil","Brasil\u00e9ia","Bujari","Capixaba","Cruzeiro do Sul","Epitaciol\u00e2ndia","Feij\u00f3","Jord\u00e3o","M\u00e2ncio Lima","Manoel Urbano","Marechal Thaumaturgo","Pl\u00e1cido de Castro","Porto Acre","Porto Walter","Rio Branco","Rodrigues Alves","Santa Rosa do Purus","Sena Madureira","Senador Guiomard","Tarauac\u00e1","Xapuri"], | |
| "Alagoas": ["\u00c1gua Branca","Anadia","Arapiraca","Atalaia","Barra de Santo Ant\u00f4nio","Barra de S\u00e3o Miguel","Batalha","Bel\u00e9m","Belo Monte","Boca da Mata","Branquinha","Cacimbinhas","Cajueiro","Campestre","Campo Alegre","Campo Grande","Canapi","Capela","Carneiros","Ch\u00e3 Preta","Coit\u00e9 do N\u00f3ia","Col\u00f4nia Leopoldina","Coqueiro Seco","Coruripe","Cra\u00edbas","Delmiro Gouveia","Dois Riachos","Estrela de Alagoas","Feira Grande","Feliz Deserto","Flexeiras","Girau do Ponciano","Ibateguara","Igaci","Igreja Nova","Inhapi","Jacar\u00e9 dos Homens","Jacu\u00edpe","Japaratinga","Jaramataia","Jequi\u00e1 da Praia","Jo |
| # Using the iugu-ruby gem's fork from https://github.com/jnettome/iugu-ruby | |
| module IuguConcerns | |
| extend ActiveSupport::Concern | |
| included do | |
| def generate_iugu_subaccount! | |
| return iugu_receiver_id if iugu_receiver_id | |
| account = Iugu::Account.create(name: name, commission_percent: 0) | |
| return fail account.errors.to_s if account.errors |
| # remove specific file from git cache | |
| git rm --cached filename | |
| # remove all files from git cache | |
| git rm -r --cached . | |
| git add . | |
| git commit -m ".gitignore is now working" |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
| // layout file | |
| <body> | |
| <div class="container"> | |
| <%= flash_messages %> | |
| <%= yield %> | |
| </div><!-- /container --> | |
| </body> |
| Deploying a simple Rails application with AWS Elastic Beanstalk by Julien SIMON, Principal Technical Evangelist @ Amazon Web Services | |
| 18/02/2016 | |
| http://www.slideshare.net/JulienSIMON5/deploying-a-simple-rails-application-with-aws-elastic-beanstalk | |
| 1. . Create a Git repository with AWS CodeCommit | |
| $ aws codecommit create-repository --repository-name blog --region us-east-1 --repository-description "ElasticBeanstalk demo" | |
| $ git clone ssh://git-codecommit.us- east-1.amazonaws.com/v1/repos/blog | |
| 2. Create a new Rails application |