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 = angular.module 'checkboxListApp' | |
app.directive 'checkboxList', -> | |
restrict: 'AE' | |
replace: true | |
scope: | |
list: '=' | |
model: '=ngModel' |
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
# By Elad Ossadon | |
app = angular.module 'eo-keepratio' | |
SPACERS = | |
'1:1': "R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" | |
'16:10': "R0lGODlhEAAKAIAAAP///wAAACH5BAEAAAAALAAAAAAQAAoAAAILhI+py+0Po5y0rgIAOw==" | |
'16:9': "R0lGODlhEAAJAIAAAP///wAAACH5BAEAAAAALAAAAAAQAAkAAAIKhI+py+0Po5yUFQA7" | |
'4:3': "R0lGODlhBAADAIAAAP///wAAACH5BAEAAAAALAAAAAAEAAMAAAIDhI9WADs=" | |
'3:1': "R0lGODlhAwABAIAAAP///wAAACH5BAEAAAAALAAAAAADAAEAAAIChAsAOw==" |
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 = angular.module 'my-app', ['eo-cached-resource-action'] | |
app.factory 'Category', ($resource, cachedResourceAction) -> | |
Category = $resource "/categories/:id/:action", {id: '@id'}, { | |
query: { method: 'GET', cache: true, isArray: true } | |
} | |
Category.query = cachedResourceAction.wrapArrayAction(Category.query) | |
Category |
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
# -*- encoding : utf-8 -*- | |
require 'spec_helper' | |
require 'shared/versioning_examples' | |
describe Grape::API do | |
module EncodingSpec | |
class API < Grape::API | |
params do | |
requires :a |
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
function sass(path) { | |
var cssFilter = $.filter('**/*.css'); | |
return gulp.src(path, { base: 'app', dot: true }) | |
.pipe($.changed($.config.tmp, {extension: '.css'})) | |
.pipe($.plumber()) | |
.pipe($.rubySass({ | |
container: path.replace(/[\*\/]/g, "_") | |
})) |
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
# routes.rb (very bottom route): | |
match '*path' => SlugRackApp | |
# slug_rack_app.rb | |
class SlugRackApp | |
def self.call(env) | |
path = env["action_dispatch.request.path_parameters"][:path] |
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 http = require('http'), | |
httpProxy = require('http-proxy'); | |
var proxy = httpProxy.createProxyServer({}); | |
var server = http.createServer(function (req, res) { | |
console.log(req.url, req.method); | |
res.setHeader('Access-Control-Allow-Origin', '*'); | |
res.setHeader('Access-Control-Request-Method', '*'); |
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
@interface TestClass : NSObject { | |
#if NS_BLOCKS_AVAILABLE | |
void (^blk)(void); | |
#endif | |
} | |
- (id)initWithBlock:(void (^)(void))block; | |
- (void)exec; | |
@end | |
@implementation TestClass |
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
# Add your own tasks in files placed in lib/tasks ending in .rake, | |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | |
require File.expand_path('../config/application', __FILE__) | |
require 'rake' | |
################################ | |
# fixes rake 0.9 bug w/ rails | |
################################ | |
module ::RailsAppNameHere |
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
^((29\/0?2(?=\/(\d{2}(0[48]|[13579][26]|[2468][048])| | |
([13579][26]|[2468][048])00))|([01]?\d|2[0-8])\/(0?\d|1[0-2])| | |
(29|30)\/(0?[13-9]|1[0-2])|31\/(0?[13578]|1[02]))\/\d{4})$ |
OlderNewer