Instance | Branch |
---|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// UIImage+Alpha.h | |
// Created by Trevor Harmon on 9/20/09. | |
// Free for personal or commercial use, with or without modification. | |
// No warranty is expressed or implied. | |
// Helper methods for adding an alpha layer to an image | |
@interface UIImage (Alpha) | |
- (BOOL)hasAlpha; | |
- (UIImage *)imageWithAlpha; | |
- (UIImage *)transparentBorderImage:(NSUInteger)borderSize; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!-- | |
Minimal JS, crossbrowser, styled input[type="file"] with simple markup. | |
Tested working in IE[>=7], FF[24], O[16], C[30], S[6.0.5]; Should work in | |
all browsers that support opening a file browser via a label associated | |
to an input[type="file"]. Some adjustments might be necessary for IE[6] | |
support. | |
Tested using html5 doctype. Further testing is necessary to ensure proper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Underscore string descending sortBy | |
* usage: | |
* Sort by name ascending `_.sortBy(data, string_comparator('name'));` | |
* Sort by name descending `_.sortBy(data, string_comparator('-name'));` | |
*/ | |
var string_comparator = function(param_name, compare_depth) { | |
if (param_name[0] == '-') { | |
param_name = param_name.slice(1), | |
compare_depth = compare_depth || 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var source = require('vinyl-source-stream'); | |
var gulp = require('gulp'); | |
var gutil = require('gulp-util'); | |
var browserify = require('browserify'); | |
var reactify = require('reactify'); | |
var watchify = require('watchify'); | |
var notify = require("gulp-notify"); | |
var scriptsDir = './scripts'; | |
var buildDir = './build'; |