Skip to content

Instantly share code, notes, and snippets.


David Demonchy fusco

Block or report user

Report or block fusco

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
fusco /
Created Mar 18, 2017 — forked from tristanm/
Migrating a Rails project from MySQL to PostgreSQL

Migrating a Rails project from MySQL to PostgreSQL

This brief guide is written from my own experience with migrating a large (~5GB) MySQL database to PostgreSQL for a Rails project.

No warranties, guarantees, support etc. Use at your own risk and, as always, ENSURE YOU MAKE BACKUPS FIRST!

I chose [pgloader][1] because it's extremely fast. YMMV.

  1. Replace mysql2 gem with pg in Gemfile.
  2. Update config/database.yml for PostgreSQL. I used [Rails' template][2] as a starting point.
View .railsrc
# .railsrc
-B #Skip Bundle
-T #Skip Test-Unit
-d postgresql #Use postgres
fusco /
Created Aug 25, 2016 — forked from tobi-pb/
Upgrade MAMP to Mysql 5.6
tar xfvz mysql-5.6*
echo "stopping mamp"
sudo /Applications/MAMP/bin/
sudo killall httpd mysqld
echo "creating backup"
fusco / nginx.conf
Created Nov 29, 2015 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
View Magento How to get the customer login, logout, register and checkout urls.php
login url
<?php echo Mage::getUrl('customer/account/login'); ?>
logout url
<?php echo Mage::getUrl('customer/account/logout'); ?>
My Account url
<?php echo Mage::getUrl('customer/account'); ?>
Register url
View Preferences.sublime-settings
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"create_window_at_startup": false,
"dictionary": "Packages/Dictionaries/French.dic",
"ensure_newline_at_eof_on_save": true,
View routes.rb
authenticated :user do
root to: "agendas#show"
unauthenticated :user do
devise_scope :user do
root to: "devise/sessions#new"
You can’t perform that action at this time.