Skip to content

Instantly share code, notes, and snippets.

😂
Learning

Justin Chen interjc

😂
Learning
Block or report user

Report or block interjc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sofish
sofish / type-day.js
Created Oct 10, 2012
detect date type
View type-day.js
// 仅支持 8 种类型的 day
// 20120409 | 2012-04-09 | 2012/04/09 | 2012.04.09 | 以上各种无 0 的状况
var isDate = function (text) {
var reg = /^([1-2]\d{3})([-/.])?(1[0-2]|0?[1-9])([-/.])?([1-2]\d|3[01]|0?[1-9])$/
, taste, validDate, yyyy, mm, dd;
if (!reg.test(text)) return false;
taste = reg.exec(text);
year = taste[1], month = taste[3], day = taste[5];
@zoghal
zoghal / localization_helper.js
Created Jul 24, 2012 — forked from davidwkeith/localization_helper.js
Localization Helper for Ember.js's Handlebars
View localization_helper.js
Handlebars.registerHelper('loc', function(property, fn) {
var str;
// we are bound to a value, it is now the context
if (fn.contexts && typeof fn.contexts[0] === 'string') {
str = fn.contexts[0];
// Convention, start all localization keys with _
} else if (property[0] === '_') {
str = property;
View gist:2848464
@devinrhode2
devinrhode2 / clean-scrollbar.css
Created May 2, 2012
Like, basically PERFECT scrollbars
View clean-scrollbar.css
/**
* Like, basically PERFECT scrollbars
*/
/*
It's pure CSS.
Since a quick google search will confirm people going crazy about Mac OS Lion scrollbars...
this has no fade-out effect.
In Mac OS Lion, the lowest common denominator is always showing scrollbars by a setting.
@DevinClark
DevinClark / JavaCandR.sublime-build
Created Jan 18, 2012
This is a build script for Sublime Text 2 that will compile and run the open java file by simply pressing cmd + B. I am very new at Java so feel free to point out problems with this script. You can just drop this file in the User Packges folder and restar
View JavaCandR.sublime-build
{
"cmd": ["javac", "$file_name"],
"cmd": ["java", "$file_base_name"],
"working_dir": "${project_path:${folder}}",
"selector": "source.java"
}
@micmcg
micmcg / gist:976172
Created May 17, 2011
Markdown cheat sheet
View gist:976172

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

View gist:527683
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
You can’t perform that action at this time.