CacheFlowe cacheflowe

View gist:7668084
1 2 3 4 5 6 7 8 9 10
.hide
opacity: 0
visibility: hidden
 
// to be added to .hide after init
.hide-ready
transition: visibility 0s linear 0.4s, opacity 0.4s linear
-webkit-transition: visibility 0s linear 0.4s, opacity 0.4s linear
 
.hide-ready.showing
View gist:7547942
1 2 3 4 5 6 7 8 9 10
disableForms: (page) ->
@formInputs = page.$el.find('input[tabindex], textarea[tabindex]')
@formInputs.off 'keydown', @handleTab
@formInputs.blur()
 
enableForms: (page) ->
@formInputs = page.$el.find('input[tabindex], textarea[tabindex]')
@formInputs.on 'keydown', @handleTab
 
handleTab: (e) =>
View Obj-C snippets for sanity and profit
1 2 3 4 5 6 7 8 9
// check existence of a local file within an app bundle -------------------------------------
 
NSString *soundFile = @"sound.wav";
NSFileManager* manager;
manager = [NSFileManager defaultManager];
if([manager fileExistsAtPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:soundFile]])
printf("file Exists...\n\n");
else
printf("File not exist...\n\n");
View Unix & Shell Commands
1 2 3 4 5 6 7 8 9 10
# file copying & filesystem stuff ##############################
 
# copy massive directories
sudo cp -R -n -p /Volumes/RAID01/_backup_laptop /Volumes/RAID2TB/machine_backups/
 
# diff directories
diff -rq /Volumes/RAID01/_backup_laptop /Volumes/RAID2TB/machine_backups/_backup_laptop/
 
# copy all files with filenames that match a pattern
cp `find *comp.png` comp/
View SASS: Retina image media query mixin
1 2 3 4 5 6 7 8 9
// webkit-only .sass --------------------------------
 
@media (min-width: 20px) and (max-width: 480px) and (-webkit-min-device-pixel-ratio: 1.5)
#site-loader-inner
background: transparent url('mobile/loaders/loader-spin@2x.png', image)
 
@media (min-width: 20px) and (max-width: 480px) and (-webkit-max-device-pixel-ratio: 1.5)
#site-loader-inner
background: transparent url('mobile/loaders/loader-spin.png', image)
Something went wrong with that request. Please try again.