Skip to content

Instantly share code, notes, and snippets.

View francois-blanchard's full-sized avatar
😁

François Blanchard francois-blanchard

😁
View GitHub Profile
@francois-blanchard
francois-blanchard / build_bootable_usb_osx.md
Last active August 29, 2015 14:16
Build bootable USB to install OS X

Build bootable USB to install OS X

  1. Choose external drive in Disk Utility
  2. Go to “Partition” tab, select “1 Partition” from select, then click “Options” and choose “GUID Partition Table” then “OK”
  3. Choose “Apply”
  4. Open terminal
  5. Execute this command with your paths informations
$ sudo /path_to_mavericks_app/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/my_external_drive --applicationpath /path_to_mavericks_app/Install\ OS\ X\ Mavericks.app --nointeraction
@francois-blanchard
francois-blanchard / generate_mongo_config_rails_4.md
Created February 21, 2015 13:52
Rails 4 generate config mogoid error, no execute, wait infinit

Rails 4 generate config mogoid error, no execute, wait infinit

1 - Check gems

gem 'mongoid', '~> 4.0.0'
gem 'bson_ext'

2 - Bundle install

@francois-blanchard
francois-blanchard / debbug_nginx.mk
Created January 12, 2015 11:25
Debbuging NGINX configuration
# Debbuging NGINX configuration
```
# check error log
tail /var/log/nginx/error.log
# check syntax nginx conf
nginx -t
# reload nginx after fix
@francois-blanchard
francois-blanchard / nginx_php_files.md
Last active August 29, 2015 14:13
Fix error with php files NGINX

Fix error with php files NGINX

Configuration /etc/nginx/site-available/default

server {
  listen 80 default_server;
  location / {
    root /home/nova/www/test/;
 index index.php;
@francois-blanchard
francois-blanchard / chef.md
Created January 6, 2015 11:22
Get started with chef
@francois-blanchard
francois-blanchard / multi_ip_remote_mysql.md
Created December 11, 2014 11:50
MySQL Server: Bind To Multiple IP Address

MySQL Server: Bind To Multiple IP Address

$ vi /etc/mysql/my.cnf
> bind-address    = 0.0.0.0
> #skip-networking
## Block all connections to 3306 ##
@francois-blanchard
francois-blanchard / export_or_import_mysql_dump.md
Last active August 29, 2015 14:11
Exporting & Importing mysql backup

Exporting & Importing mysql backup

Exporting:

$ mysqldump -u user -p database | gzip > database.sql.gz

Importing:

$ gunzip < database.sql.gz | mysql -u user -p database_name
@francois-blanchard
francois-blanchard / add_user_mysql.md
Created December 11, 2014 10:11
Add user MySQL

Add user MySQL

> CREATE DATABASE name_database;
> CREATE USER 'name_user'@'ip_or_localhost' IDENTIFIED BY 'choose_password';
> GRANT ALL PRIVILEGES ON name_database.* TO 'name_user'@'ip_or_localhost';
> FLUSH PRIVILEGES;

Delete user

@francois-blanchard
francois-blanchard / heroku_rake_cmd.md
Created December 11, 2014 09:03
Heroku Running Rake Commands

Heroku Running Rake Commands

 heroku run rake my_task
```
@francois-blanchard
francois-blanchard / auto_start_percona.md
Last active August 29, 2015 14:10
percona server auto start OS X

percona server auto start OS X

$ brew install percona-server

$ ln -sfv /usr/local/opt/percona-server/*.plist ~/Library/LaunchAgents
$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.percona-server.plist

# if you want stop it
$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.percona-server.plist