Skip to content

Instantly share code, notes, and snippets.


Keybase proof

I hereby claim:

  • I am betamike on github.
  • I am betamike ( on keybase.
  • I have a public key whose fingerprint is 9C10 CBEC A5A4 DD69 67CA 4F7A 9B11 4689 C03C 7D02

To claim this, I am signing this object:

View mopub_ads.html
mopub_ad_unit = 'agltb3B1Yi1pbmNyDQsSBFNpdGUY0ZOZEww';
mopub_ad_width = 300;
mopub_ad_height = 250;
<script src=""></script>
View iscroll-lite.js
tagName =;
if (that.focusedInput) {
that.focusedInput = false;
if (tagName === "select" || tagName === "input" || tagName === "textarea") {
View SongCacher.m
<<<<<<< HEAD
static NSString *const selectEmptyPlaylists = @"SELECT DISTINCT p.playlistID FROM playlists AS p LEFT OUTER JOIN playlists_songs AS ps ON p.playlistID = ps.playlistID WHERE ps.songID IS NULL";
>>>>>>> Fixed bug: deleting offline (and all) songs from a playlist does not clear the playlist offline songs count
FMResultSet *emptyListSet = [db executeQuery:selectEmptyPlaylists];
NSMutableSet *emptyPlaylists = [NSMutableSet set];
while ([emptyListSet next])
View SettingsViewController.m
NSString *logsPath = [[NSFileManager pathToDocumentsDirectory] stringByAppendingPathComponent:@".logs"];
NSArray *filenames = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:logsPath error:NULL];
if (filenames == nil)
View FetchTest.m
//test method which roughly mimics how I normally fetch results
static NSString * const selectFavorites = @"SELECT songId, title FROM songs LIMIT 50";
NSMutableArray *fetched = [NSMutableArray array];
FMResultSet *resultSet = [[self database] executeQuery:selectFavorites];
NSTimeInterval start = [NSDate timeIntervalSinceReferenceDate];
View gist:559176
def compute_suffix_table(pattern)
suffix = []
index = 0
cur = pattern.length - 1
pattern.reverse.each_char do |c|
if index == 0
(1...pattern.length).reverse_each do |i|