Skip to content

Instantly share code, notes, and snippets.

@hellosmithy
hellosmithy / rebase
Created June 15, 2015 13:47
git rebase
$ git rebase -i HEAD~4
pick 01d1124 Adding license
pick 6340aaa Moving license into its own file
pick ebfd367 Jekyll has become self-aware.
pick 30e0ccb Changed the tagline in the binary, too.
# Rebase 60709da..30e0ccb onto 60709da
#
# Commands:
@hellosmithy
hellosmithy / serialize_data_override.js
Created July 28, 2014 14:26
Marionette `serializeData` override
serializeData: function() {
// call the original
var data = Marionette.View.prototype.serializeData.apply(this, arguments);
// add new data
data.whatever = myChannel.request('whatever');
return data;
}
@hellosmithy
hellosmithy / unload.js
Created July 1, 2014 13:05
Mobile Safari image unload
// Credit to: http://www.fngtps.com/2010/mobile-safari-image-resource-limit-workaround/
var img = document.getElementById('previous');
img.parentNode.removeChild(img);
img.src = 'data:image/gif;base64,' +
'R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
window.timeout(function() {
img = null;
}, 60000);
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"annotations": {
git config --global alias.search 'log -S'
@hellosmithy
hellosmithy / search-ignore.txt
Created June 3, 2014 10:20
SublimeText search ignore pattern
-deploy/*/**, -node_modules/*/**, -source/vendor/*/**, -dist/*/**, -flash/*/**
@hellosmithy
hellosmithy / .editorconfig
Created June 2, 2014 14:57
Default Editor Config
# http://editorconfig.org
root = true
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
@hellosmithy
hellosmithy / SublimeText_Packages.md
Last active November 26, 2015 18:05
Useful SublimeText3 Packages
@hellosmithy
hellosmithy / no-cors
Created December 12, 2013 11:45
Open Chrome with CORS disabled for testing
open -a Google\ Chrome --args --disable-web-security
@hellosmithy
hellosmithy / box-sizing.styl
Created November 21, 2012 17:29
* { box-sizing: border-box } FTW (Stylus)
// Vendor mix-in for box-sizing
// assumes use of vendor interpolation
// http://learnboost.github.com/stylus/docs/interpolation.html
box-sizing()
vendor('box-sizing', arguments)
// apply a natural box layout model to all elements
*