Skip to content

Instantly share code, notes, and snippets.

View maml's full-sized avatar
💭
build

Matthew Loseke maml

💭
build
  • Laurentide Ice Sheet
View GitHub Profile
@maml
maml / UITableView+PreventEmptyCells
Created April 3, 2014 19:28
Category on UITableView that will prevent empty cells from rendering
// Put the following in a file called UITableView+PreventEmptyCells.h
#import <UIKit/UIKit.h>
@interface UITableView (PreventEmptyCells)
+ (void)preventEmptyRows:(UITableView *)tableView;
@end
@maml
maml / git
Created March 30, 2013 00:55
If you want to commit on top of the current HEAD with the exact state at a different commit, undoing all the intermediate commits, then you can use reset to create the correct state of the index to make the commit.
# reset the index to the desired tree
git reset --hard 56e05fced (the sha you `want to go to there` to)
# move the branch pointer back to the previous HEAD
git reset --soft HEAD@{1}
git commit -m "Revert to 56e05fced"
@maml
maml / mi.js
Created February 29, 2012 00:03
method invocation
var mthdInvctnPtrn = {
init: function() {
// ^oh!
},
meth: function() {}
}
@maml
maml / anonymous.js
Created February 28, 2012 23:53
jquery anonymous pattern?
$(function() {
var ghost = 'face';
function blah() {
// do shit . . .
}
});
command line fu from @fpolgardy
find . -name '*.sass'
and . . .
find . -name '*.sass' | xargs grep colors