Skip to content

Instantly share code, notes, and snippets.

View githiro's full-sized avatar

Hiro githiro

  • Tokyo
View GitHub Profile
@githiro
githiro / gist:5702231
Created June 3, 2013 23:05
CSS: clearfix
/* clearfix */
.clearfix:before, .clearfix:after {
content: "";
display: block;
overflow: hidden;
}
.clearfix:after { clear: both; }
.clearfix { zoom: 1; }
@githiro
githiro / gist:5702325
Created June 3, 2013 23:23
JS: Detect Animation End
$("#").bind("animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd", function()
{
});
@githiro
githiro / gist:5702342
Created June 3, 2013 23:26
JS: Detect Transition End
$("#").bind("transitionend webkitTransitionEnd MSTransitionEnd oTransitionEnd", function()
{
});
@githiro
githiro / gist:5702370
Created June 3, 2013 23:33
JS: Basic template with _self
var _self = {};
_self.$ = {};//jQuery objects container
_self.init = function() {
_self.$.someElem = $("#someElem");
};
$(function() {
_self.init();
});
@githiro
githiro / gist:5702429
Created June 3, 2013 23:42
JS: console.log workaround for IE
/**
* console.log workaround for IE(6,7)
*
**/
if (!('console' in window)) {
window.console = {};
window.console.log = function(str) {
return str;
};
}
@githiro
githiro / gist:5702722
Created June 4, 2013 00:39
CSS: transition cubic-bezier set
-moz-transition: all .4s cubic-bezier(.70, 0, .60, 1);
-webkit-transition: all .4s cubic-bezier(.70, 0, .60, 1);
-ms-transition: all .4s cubic-bezier(.70, 0, .60, 1);
-o-transition: all .4s cubic-bezier(.70, 0, .60, 1);
transition: all .4s cubic-bezier(.70, 0, .60, 1);
@githiro
githiro / gist:5702750
Created June 4, 2013 00:45
CSS: Text overflow ellipsis
white-space: nowrap;
overflow: hidden;
-webkit-text-overflow: ellipsis;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
@githiro
githiro / Preferences.sublime-settings
Last active April 3, 2018 07:19
Sublime Text2: sublime-settings
{
"font_face": "Ricty",
"font_size": 17,
"ignored_packages":
[
"Vintage"
],
"draw_white_space": "all",
"word_wrap": "false",
"highlight_line": true,
@githiro
githiro / Emmet.sublime-settings
Created June 4, 2013 05:18
Sublime Text2: Emmet.sublime-settings
{
// Custom snippets definitions, as per https://github.com/emmetio/emmet/blob/master/snippets.json
"snippets": {
"html": {
"abbreviations": {
"ab": "<a href=\"#\" target=\"_blank\">",
"av": "<a href=\"javascript: void 0;\" onclick=\"\">"
}
}
}
@githiro
githiro / Default (Windows).sublime-keymap
Created June 4, 2013 05:20
Sublime text2: sublime-keymap(change tabs by ltr or rtl order)
[
{"keys": ["ctrl+tab"], "command": "next_view"},
{"keys": ["ctrl+shift+tab"], "command": "prev_view"},
{"keys": ["ctrl+pagedown"], "command": "next_view_in_stack"},
{"keys": ["ctrl+pageup"], "command": "prev_view_in_stack"},
{"keys": ["ctrl+shift+r"], "command": "browser_refresh", "args": {
"auto_save": true,
"delay": 0,
"activate_browser": true,
"browser_name": "all"