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
require 'rack' | |
## | |
# Tries to calculate size of the complete response. | |
# This middleware should be chained in front of everything else. | |
# Middleware taking care of compression, etag handling etc could | |
# produce wrong results. | |
# | |
# Leaves streaming intact and does work file bodies from sockets | |
# and files. |
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 () { | |
"use strict"; | |
var vows = require('vows') | |
, suite | |
, batch | |
, helloWorld = require('./index') | |
, assert = require('assert') | |
, request = require('ahr2') | |
, createJoin = require('join') |
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
window.addEvent('domready', function() { | |
$('fullconfreg').addEvent('click', calculate); | |
$('fullconfspouse').addEvent('click', calculate); | |
$('fullconfregfirsttime').addEvent('click', calculate); | |
$('intspeechticket').addEvent('click', calculate); | |
$('evalticket').addEvent('click', calculate); | |
$('fridinnerham').addEvent('click', calculate); | |
$('fridinnerroastbeef').addEvent('click', calculate); | |
$('fridinnerturkey').addEvent('click', calculate); | |
$('satlunch').addEvent('click', calculate); |
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
// Strict mode and non-strict mode | |
(function () { | |
"use strict"; | |
function Foo(a, b, c) { | |
if (!this instanceof Foo) { | |
return new Foo(a, b, c); | |
} | |
this.a = a; | |
this.b = b; |
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 () { | |
"use strict"; | |
var curlString = "", | |
cookieHeader = ' --header \"Cookie:'+ document.cookie + '\" '; | |
$('li.item_row > a.lecture-link').each(function (index) { | |
var $lectureLink, | |
videoLink, | |
videoName, | |
subtitleLink, | |
subtitleName; |
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
# I am a scientist who has been using R for about 2 years. Today I achieved a measure of enlightenment into | |
# the zen of R, and I want to share it with you. | |
# I was simulating a set of independent random walks, which are formed by a multiplicative process. Here is | |
# the code I had built up over a few months of working on it and modifying it on and off as research | |
# questions changed: | |
TimeSteps <- 1000 | |
Walks <- 100 | |
ErrorMagnitude <- 0.03 |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
⨀_⨀ | |
⨂_⨂ | |
(/◔ ◡ ◔)/ | |
°ﺑ° | |
(¬_¬) | |
(´・ω・`) | |
(ʘ_ʘ) | |
(ʘ‿ʘ) | |
(๏̯͡๏ ) | |
(◕_◕) |
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
define( [ 'views/SearchView' ], function( SearchView ){ | |
describe('SearchView', function() { | |
var searchView, spy | |
beforeEach(function() { | |
setFixtures( $( "<input type='search' id='search'/>" ) ) | |
searchView = new SearchView() | |
searchView.render() | |
spy = jasmine.createSpyObj( 'event', [ 'handler' ] ) | |
}) |
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
Ticket = Backbone.Model.extend({ | |
urlRoot: 'api/Ticket/' | |
}); | |
TicketView = Backbone.View.extend({ | |
initialize: function(model) { | |
this.model = model; | |
this.listenTo(this.model, 'change', this.render.bind(this)); | |
this.render() |
OlderNewer