Skip to content

Instantly share code, notes, and snippets.

View francelwebdev's full-sized avatar

FrancelWebdev francelwebdev

View GitHub Profile
@francelwebdev
francelwebdev / ubuntu-xenial-remove-amp.sh
Created April 15, 2018 10:59 — forked from jasperf/ubuntu-xenial-remove-amp.sh
Remove Apache, MySQL and PHP 7 on Ubuntu Xenial #php #ubuntu #lamp
sudo apt remove apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php libapache2-mod-php7.0 php7.0-mysql php7.0-opcache php7.0-readline mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7 php-mysql php7.0-mysql php-common php-mysql php7.0-cli php7.0-common php7.0-json
@francelwebdev
francelwebdev / attachinary_setup.md
Created February 26, 2018 15:25 — forked from ssaunier/attachinary_setup.md
Attachinary Setup in Rails 5

Attachinary Setup

First add the following gems to your Gemfile:

# Gemfile
gem "attachinary"
gem "jquery-fileupload-rails"
gem "coffee-rails"
@francelwebdev
francelwebdev / restful_routes.md
Created February 15, 2018 10:22 — forked from alexpchin/restful_routes.md
7 Restful Routes
URL HTTP Verb Action
/photos/ GET index
/photos/new GET new
/photos POST create
/photos/:id GET show
/photos/:id/edit GET edit
/photos/:id PATCH/PUT update
/photos/:id DELETE destroy
@francelwebdev
francelwebdev / Rails-applications-health-codes.md
Created February 11, 2018 20:18 — forked from kathyonu/Rails-applications-health-codes.md
Rails Applications Upgrade Steps for Ruby, Rails and Gems

Commands to keep your app healthy, Ruby and Rails gems wise.
Each command is described further below.
Open new Terminal, note the gemsets showing:

rvm gemset list

You will see you are using the (default) gemset.
Keep your system up to date with rvm and brew:

rvm get stable

@francelwebdev
francelwebdev / add_locale_to_users.rb
Created February 11, 2018 19:42 — forked from Bahanix/add_locale_to_users.rb
Ruby on Rails i18n: using user locale
# db/migrates/*_add_locale_to_users.rb
class AddLocaleToUsers < ActiveRecord::Migration
def change
add_column :users, :locale, :string, default: "fr"
end
end
@francelwebdev
francelwebdev / Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
Created February 8, 2018 10:41 — forked from Prototype-X/Install_pgAdmin4_with_python3_on_Ubuntu 16.04.md
Install pgAdmin4 v2.0 with python3 on Ubuntu 16.04 DESKTOP mode

Install pgAdmin4 v2.0 with python3 on Ubuntu 16.04 DESKTOP mode

  1. Get Python Wheel pgAdmin4

     wget https://ftp.postgresql.org/pub/pgadmin/pgadmin4/v2.0/pip/pgadmin4-2.0-py2.py3-none-any.whl
    
  2. Install pip3

     sudo apt install python3-pip
    
@francelwebdev
francelwebdev / deploying_rails_to_heroku.md
Created January 18, 2018 17:14 — forked from thebucknerlife/deploying_rails_to_heroku.md
A Beginners Guide to Deploying a Rails App on Heroku

Deploying to Heroku

This guide is for a first-time Rails developer to deploy their app to Heroku, a popular web-hosting service with strong Rails support. This guide assumes you already have a Heroku account and have installed the Heroku Toolbelt.

Create Your App and Setup Heroku with Git

  1. Make sure you've setup an SSH key for Heroku. Follow this simple guide to create an SSH key and send it to Heroku if needed: Heroku: Managing Your SSH Keys
  2. Navigate into the folder for your Rails app.