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
| def call(source, request) | |
| if request.ssl? | |
| case | |
| when javascript_file?(source) | |
| ssl_asset_host(source) | |
| when safari?(request) | |
| asset_host(source) | |
| when firefox?(request) && image_file?(source) | |
| asset_host(source) | |
| else |
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
| Disk Test 142.12 | |
| Sequential 101.67 | |
| Uncached Write 41.85 25.69 MB/sec [4K blocks] | |
| Uncached Write 194.92 110.29 MB/sec [256K blocks] | |
| Uncached Read 128.17 37.51 MB/sec [4K blocks] | |
| Uncached Read 397.72 199.89 MB/sec [256K blocks] | |
| Random 236.04 | |
| Uncached Write 126.44 13.38 MB/sec [4K blocks] | |
| Uncached Write 143.38 45.90 MB/sec [256K blocks] | |
| Uncached Read 2413.15 17.10 MB/sec [4K blocks] |
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
| 1 def nodeunit(*files) | |
| 2 system "bin/nodeunit #{ files.join(' ') }" | |
| 3 end | |
| 4 | |
| 5 watch("test/unit/.*") do |match| | |
| 6 nodeunit match[0] | |
| 7 end | |
| 8 | |
| 9 # Run unit tests by default | |
| 10 |
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
| switch(request.responseStatusCode) { | |
| case 200: | |
| SBJsonParser *jsonParser = [[[SBJsonParser alloc] init] autorelease]; | |
| NSDictionary *dictionary = [jsonParser objectWithString: [request responseString]]; |
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/bash | |
| # Cronic v2 - cron job report wrapper | |
| # Copyright 2007 Chuck Houpt. No rights reserved, whatsoever. | |
| # Public Domain CC0: http://creativecommons.org/publicdomain/zero/1.0/ | |
| set -eu | |
| OUT=/tmp/cronic.out.$$ | |
| ERR=/tmp/cronic.err.$$ |
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
| for(idx = 0; idx < 8; idx++) { | |
| var callback = function () { | |
| var index = idx; | |
| return function() { | |
| console.log(index); | |
| } | |
| }(); | |
| setTimeout(callback, 5); |
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
| for(idx = 0; idx < 8; idx++) { | |
| with({index: idx}) { | |
| setTimeout(function() { console.log([idx, index]) }, 5); | |
| } | |
| } |
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
| <?php | |
| $login = 'xxxxxxxx'; /* Username */ | |
| $password = 'xxxxxxxx'; /* Password */ | |
| $path = 'Test.pdf'; /* Path to file */ | |
| $recipient = '+43125330331115'; /* Recipient */ | |
| $handle = curl_init(); | |
| $url = 'https://' . $login . ':' . $password . '@faxonline.at/api-v1/faxes.json'; |
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
| spinOptions = | |
| lines: 12 | |
| length: 4 | |
| width: 2 | |
| radius: 4 | |
| color: '#333' | |
| fadeInTime = 400 | |
| minTime = 400 | |
| fadeOutTime = 600 |
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 parseResponseCookies = function (response) { | |
| var Cookie = function (cookieString) { | |
| var fields = cookieString.split(/; ?/).map(function (item) { | |
| return item.split('='); | |
| }); | |
| var metadata = fields.reduce(function (prev, curr) { | |
| prev[curr[0]] = curr[1]; | |
| return prev; | |
| }, {}); |