Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

David Demonchy fusco

🎯
Focusing
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 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 / 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;
}
View .railsrc
# .railsrc
-B #Skip Bundle
-T #Skip Test-Unit
-d postgresql #Use postgres
@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 / 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 / ajenti.err.log
Created Jan 21, 2014
Logs for Ajenti 1.2.15 - debian package. ajenti don't start
View ajenti.err.log
Traceback (most recent call last):
File "/usr/bin/ajenti-panel", line 88, in <module>
core.run()
File "/usr/lib/pymodules/python2.7/ajenti/core.py", line 147, in run
Inflater.get(manager.context).precache()
File "/usr/lib/pymodules/python2.7/ajenti/ui/inflater.py", line 36, in precache
self.inflate(temp_ui, layout)
File "/usr/lib/pymodules/python2.7/ajenti/ui/inflater.py", line 71, in inflate
self.cache[layout] = self.inflate_rec(ui, xml)
File "/usr/lib/pymodules/python2.7/ajenti/ui/inflater.py", line 106, in inflate_rec
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,
"file_exclude_patterns":
[
".DS_Store",
".tags*",
"*.pyc",
View routes.rb
authenticated :user do
root to: "agendas#show"
end
unauthenticated :user do
devise_scope :user do
root to: "devise/sessions#new"
end
end
You can’t perform that action at this time.