Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

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
fusco / index.html
Created Jun 19, 2017
page basique html5
View index.html
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Titre de la page</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
...
@fusco
fusco / README.md
Created Mar 18, 2017 — forked from tristanm/README.md
Migrating a Rails project from MySQL to PostgreSQL
View README.md

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
View gist:26aa9f6089dddfab7b908a53b4857d07
$ brew install php56 php56-mcrypt
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.
==> Installing php56 from josegonzalez/php
==> Downloading https://php.net/get/php-5.6.25.tar.bz2/from/this/mirror
Already downloaded: /Users/fusco/Library/Caches/Homebrew/php56-5.6.25
==> ./configure --prefix=/usr/local/Cellar/php56/5.6.25_1 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.6 --with-co
Last 15 lines from /Users/fusco/Library/Logs/Homebrew/php56/01.configure:
@fusco
fusco / migrate.sh
Created Aug 25, 2016 — forked from tobi-pb/migrate.sh
Upgrade MAMP to Mysql 5.6
View migrate.sh
#!/bin/sh
wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.24-osx10.9-x86_64.tar.gz
tar xfvz mysql-5.6*
echo "stopping mamp"
sudo /Applications/MAMP/bin/stop.sh
sudo killall httpd mysqld
echo "creating backup"
@fusco
fusco / astuce.txt
Last active Sep 21, 2016
Configurer nginx pour qu'il arrête de répondre avec n'importe quel site
View astuce.txt
server {
return 404;
}
server {
listen 80;
server_name my.domain.tld;
}
@fusco
fusco / index.html
Last active Jun 8, 2016
html5 base
View index.html
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Titre de la page</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<!-- ... ... -->
@fusco
fusco / nginx.conf
Created Nov 29, 2015 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
View config.xml
<?xml version="1.0"?>
<!--
/*
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0) that is available
* through the world-wide-web at this URL: http://www.opensource.org/licenses/OSL-3.0
* If you are unable to obtain it through the world-wide-web, please send an email
* to contact@mageho.com so we can send you a copy immediately.
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
You can’t perform that action at this time.