Skip to content

Instantly share code, notes, and snippets.

View seagoj's full-sized avatar

Jeremy Seago seagoj

View GitHub Profile
@seagoj
seagoj / mysql_db_compare.sql
Last active January 4, 2016 15:19
Compare two MySQL DB Schemas
SET @source_db = 'db1';
SET @target_db = 'db2';
SELECT
'Only in source' exist_type,
c1.table_schema, c1.table_name, c1.column_name, c1.ordinal_position, c1.column_default, c1.is_nullable, c1.numeric_precision, c1.numeric_scale, c1.character_set_name, c1.collation_name, c1.column_type, c1.column_key, c1.extra, c1.column_comment
FROM
(SELECT * FROM information_schema.columns WHERE TABLE_SCHEMA = @source_db) c1
LEFT JOIN (SELECT * FROM information_schema.columns WHERE TABLE_SCHEMA = @target_db) c2
ON c1.TABLE_name = c2.TABLE_name AND c1.column_name = c2.column_name
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)
@seagoj
seagoj / CapsToWIn.reg
Created November 20, 2013 22:44
Map Caps Lock to WIn key
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,5c,e0,3a,00,00,00,00,00
@seagoj
seagoj / devtools.js
Last active December 26, 2015 06:49
Jquery slideshow functions
var merge = function(obj1, obj2) {
var ret = obj1;
for(index in obj2) {
ret[index] = obj2[index];
}
return ret;
};