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
# Is there a coffeescript way of doing this? | |
(function($, exports){ | |
# doing random stuff here | |
})(jQuery, window); | |
# Other than this: | |
( ($, exports) -> | |
# doing random stuff here |
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
# app/validators/reserved_name_validator.rb | |
class ReservedNameValidator < ActiveModel::EachValidator | |
RESERVED_NAMES = %w{ | |
about account add admin api | |
app apps archive archives auth | |
blog | |
config connect contact create | |
delete direct_messages downloads | |
edit email | |
faq favorites feed feeds follow followers following |
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 gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var handleErrors = require('../util/handleErrors'); | |
var source = require('vinyl-source-stream'); | |
var packageJson = require('../../package.json'); | |
var dependencies = Object.keys(packageJson && packageJson.dependencies || {}); | |
gulp.task('libs', function () { |
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 gulp = require('gulp'); | |
var source = require('vinyl-source-stream'); // Used to stream bundle for further handling | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var gulpif = require('gulp-if'); | |
var uglify = require('gulp-uglify'); | |
var streamify = require('gulp-streamify'); | |
var notify = require('gulp-notify'); | |
var concat = require('gulp-concat'); | |
var cssmin = require('gulp-cssmin'); |
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
/* | |
* Simple hash map using javascript objects and an ordered array. | |
* Repeated elements are not allowed. | |
* | |
* @param sort_method By default is ASC order, but you can specified whatever you want. | |
* | |
* The public methods are: | |
* -set | |
* -get | |
* -del |
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
# http://editorconfig.org | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
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
################################################################################ | |
# script: Base.coffee | |
# author: Ryan Florence <rpflorence@gmail.com> | |
# license: MIT-Style License | |
# | |
# A surprisingly useful base class for CoffeeScript. Inspired by my old | |
# friend, MooTools Class. Provides default options, mixins, and custom events. | |
class Base | |
defaults: {} |
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
.PHONY: test | |
test: | |
qunit test/index.html |
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 _flash_installed = ((typeof navigator.plugins != "undefined" && typeof navigator.plugins["Shockwave Flash"] == "object") || (window.ActiveXObject && (new ActiveXObject("ShockwaveFlash.ShockwaveFlash")) != false)); |
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
const promisify = (fn) => ( | |
(...args) => ( | |
new Promise((resolve, reject) => { | |
fn(...args, (err, ...res) => { | |
if (err) reject(err) | |
else resolve(...res) | |
}) | |
}) | |
) | |
) |
OlderNewer