Skip to content

Instantly share code, notes, and snippets.

View geraldyeo's full-sized avatar
🎯
Focusing

Gerald Yeo geraldyeo

🎯
Focusing
View GitHub Profile
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';
/**
* 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;

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
<!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
@geraldyeo
geraldyeo / 0_reuse_code.js
Created December 9, 2013 09:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// 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;