Skip to content

Instantly share code, notes, and snippets.

@jbonney
jbonney / link.txt
Created September 4, 2013 07:23
Screenfly. Responsive screen testing on monitors, tablets, smart phones, and more.
@jbonney
jbonney / links.txt
Created September 1, 2013 16:24
Learning ressources
@jbonney
jbonney / links.txt
Created September 1, 2013 16:14
Ressources to learn more about mina (automatic deployment scripts)
# Tunnel: allow to use localhost:2525 as if it was server.com:25
ssh -f user@server.com -L 2525:server.com:25 -N
# SOCKS Proxy: configure web browser to use SOCKS proxy on localhost:8080
ssh -D 8080 -C user@server.com
@jbonney
jbonney / links.txt
Created August 30, 2013 23:15
Git flow process and ressources
@jbonney
jbonney / handsontable.txt
Created August 30, 2013 22:56
Handsontable 0.9.16: a minimalistic Excel-like data grid editor for HTML, JavaScript & jQuery (http://warpech.github.io/jquery-handsontable/index.html)
http://warpech.github.io/jquery-handsontable/index.html
@jbonney
jbonney / conversion.sh
Created August 30, 2013 22:08
Convert MySQL default character set (encoding) from latin1 to utf8.
mysqldump --user="username" --password="password" -c -e --default-character-set=utf8 --single-transaction --skip-set-charset --add-drop-database -B "database_name" > dump.sql
sed 's/DEFAULT CHARACTER SET latin1/DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci/' <dump.sql | sed 's/DEFAULT CHARSET=latin1/DEFAULT CHARSET=utf8/' >dump-fixed.sql
mysql --user="username" --password="password" < dump-fixed.sql
@jbonney
jbonney / mysqldump.sh
Created August 30, 2013 22:04
MySQL dump to export data only (no DB schema nor table instructions). Particularly useful when exporting a Rails DB to re-import it afterwards in a DB that has been created through `rake db:drop db:create db:migrate`.
mysqldump --user="username" --password="password" --skip-triggers --compact --no-create-info --ignore-table="database_name.schema_migrations" --ignore-table="database_name.table_populated_through_migration" "database_name" > "dump.sql"
SHOW VARIABLES LIKE 'char%';
SHOW VARIABLES LIKE '%collation%';
SHOW TABLE STATUS FROM database_name;
file --mime myfile.txt