Skip to content

Instantly share code, notes, and snippets.

@YogSottot
YogSottot / fix_database_to_utf8.py
Last active May 25, 2018 12:10 — forked from ibnIrshad/fix_database_to_utf8.py
Small python script that converts character sets to utf8 in all databases and tables. My solution for "Illegal mix of collations" errors. (http://stackoverflow.com/questions/3029321/how-to-solve-illegal-mix-of-collations-in-mysql)
from MySQLdb import connect
conn = connect(user="[user]", passwd= "[password]", host="[host]")
cur = conn.cursor()
cur.execute("show databases;")
dbs_to_update = filter(
lambda db: db not in ('information_schema', 'mysql', 'performance_schema'),
[dbname[0] for dbname in cur.fetchall()])
@YogSottot
YogSottot / Colemak-DH-mod_dvorak_programmer.kbd.json
Last active August 8, 2016 13:38
Colemak-DH-mod+dvorak_programmer
[
{
"backcolor": "#ffffff",
"name": "Colemak-DH-mod+dvorak_programmer"
},
[
"Esc",
{
"x": 1
},