This file contains hidden or 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
class Deflater | |
def initialize app | |
@app = app | |
end | |
def call env | |
if acceptable_method?(env) && compress?(env) | |
Rack::Deflater.new(app).call env | |
else | |
app.call env |
This file contains hidden or 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
<a id="tbd-btn-1" href="#">Go with friends</a> | |
<script type="text/javascript" src="https://js.thebestday.com/v1.js"></script> | |
<script type="text/javascript"> | |
var openModal = function() { | |
var plan = new theBestDay.widget.Plan({ | |
title: "Surry Hills Lunch Time" | |
}); | |
var modal = new theBestDay.widget.Modal(); |
This file contains hidden or 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
/** | |
* @license AngularJS v1.2.0-rc.3 | |
* (c) 2010-2012 Google, Inc. http://angularjs.org | |
* License: MIT | |
*/ | |
(function(window, document, undefined) {'use strict'; | |
/** | |
* @description | |
* |
This file contains hidden or 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
#!/bin/sh | |
if [ "$#" -eq 0 ]; then | |
$(npm bin)/karma start $(cd "$(dirname "$0")"; pwd)/../spec/javascripts/karma.conf.js --single-run | |
else | |
$(npm bin)/karma $@ | |
fi |
This file contains hidden or 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
#!/usr/bin/env ruby | |
if ARGV.empty? | |
system "$(npm bin)/karma start #{File.expand_path('../../spec/javascripts/karma.conf.js', __FILE__) --single-run}" | |
else | |
system "$(npm bin)/karma #{ARGV.join(' ')}" | |
end |
This file contains hidden or 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
#!/bin/sh | |
if [ "$#" -eq 0 ]; then | |
karma start path/to/config/relative/to/this/file | |
else | |
karma $@ | |
fi |
This file contains hidden or 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
if default = Rake.application.instance_variable_get('@tasks')['default'] | |
default.prerequisites.clear | |
end | |
task default: ['spec', 'konacha:run'] |
This file contains hidden or 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
File.expand_path('../../../path/to/config/from/this/file', __FILE__) |
This file contains hidden or 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.factory('card', function(payment) { | |
card = function(attrs) { | |
this.errors = {}; | |
return this; | |
}; | |
card.prototype.isValid = function() { | |
if (!payment.validateCardNumber(this.number)) { | |
this.errors.number = 'invalid'; |
This file contains hidden or 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 MyClass = function() { | |
this.myAttribute = 1; | |
return this; | |
}; | |
MyClass.classMethod = function() { | |
}; | |
MyClass.prototype.instancMethod = function() { |