Skip to content

Instantly share code, notes, and snippets.

View myeonwoo's full-sized avatar

Myeonwoo Lim myeonwoo

View GitHub Profile
@myeonwoo
myeonwoo / msql_table_size.sql
Created September 19, 2017 04:56
MYSQL: Table Size
SELECT
table_name AS `Table`,
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB`
FROM information_schema.TABLES
WHERE table_schema = "eng_dangicokr"
AND table_name = "{table_name}";
@myeonwoo
myeonwoo / gist:899d821166d3bea6451bedba69935d87
Created September 19, 2017 04:01
CSS: Emmet - examples
<!-- Skip The Div #1 -->
div.container
<!-- Skip The Div #2 -->
.container
<!-- Implicit Tag Names -->
.wrap>ul.list>.sites
<!-- Chaining Abbreviations -->
var IE = (function () {
"use strict";
var ret, isTheBrowser,
actualVersion,
jscriptMap, jscriptVersion;
isTheBrowser = false;
jscriptMap = {
"5.5": "5.5",
@myeonwoo
myeonwoo / gist:2b57e953ff0a14d24d85f35589d49934
Created September 15, 2017 06:43
JavaScript: Jquery PubSub
(function($){
var o = $({});
$.each({
on: 'subscribe',
trigger: 'publish',
off: 'unsubscribe'
}, function(key, api) {
$[api] = function(){
o[key].apply(o, arguments);
}
@myeonwoo
myeonwoo / gist:1fb4e6d5234cba8fcf64a0b5e6c2d166
Created September 15, 2017 06:40
CSS: Image Replacement
.ir {
boarder:0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@myeonwoo
myeonwoo / gist:77aff182cf4624fbf3732ef1e12c0a36
Created September 15, 2017 06:38
JavaScript: Sexy PubSub
// Works in modern browsers + IE9, but Modernizr has a polyfill baked in for function.bind
// Hat tip Paul Irish
var o = $({});
$.subscribe = o.on.bind(o);
$.unsubscribe = o.off.bind(o);
$.publish = o.trigger.bind(o);