New:
| build | integration tests | npm | dependencies |
|---|---|---|---|
| # | |
| # Sources: | |
| # http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites | |
| # http://codex.wordpress.org/Output_Compression | |
| # http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086 | |
| # http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/ | |
| # http://gtmetrix.com/configure-entity-tags-etags.html | |
| # http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014 | |
| # http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress | |
| # |
| var assert = require('assert'); | |
| var RecordId = require('oriento').RID; | |
| var _ = require('lodash'); | |
| var N = 4000; | |
| function matchRecordIdOriginal(id) { | |
| if (id === null || id == undefined) return false; | |
| var test = _.cloneDeep(id); | |
| if(typeof test.toString !== 'undefined') |
| 0 info it worked if it ends with ok | |
| 1 verbose cli [ 'node', '/usr/local/bin/npm', 'publish' ] | |
| 2 info using [email protected] | |
| 3 info using [email protected] | |
| 4 verbose publish [ '.' ] | |
| 5 silly cache add args [ '.', null ] | |
| 6 verbose cache add spec . | |
| 7 silly cache add parsed spec { raw: '.', | |
| 7 silly cache add scope: null, | |
| 7 silly cache add name: null, |
| var baseX = require('base-x')('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'); | |
| var b62 = require('./b62'); | |
| var buf = new Buffer([0x30, 0x17, 0xe8, 0x92, 0xe2, 0x3d, 0xff]); | |
| var str = "Hello World!"; | |
| var encodedX, encoded62, decodedX, decoded62, runs=100; | |
| // warm up | |
| console.time('base-x'); |
| 'use strict'; | |
| var adSenseTpl = '<div id="adsenses-ad-1"><ins class="adsbygoogle"' + | |
| 'style="display:inline-block;width:336px;height:280px"' + | |
| 'data-ad-client="ca-pub-000000000000000000"' + | |
| 'data-ad-slot="00000000000"></ins></div>'; | |
| var adsenseAd1; | |
| angular.module('MyApp') |
| /** | |
| * Sometimes there is the need to have optional tests that may need to run conditionally as discussed in: | |
| * http://stackoverflow.com/questions/19075792/unit-tests-for-optional-units | |
| * This solution is good but if our tests are part of a test suite that runs against many different kinds of implementations | |
| * it may be desirable to have optional tests that "pass" if they are supported and become "pending" if they fail. | |
| * This way we don't have to break the whole test suit because of an optional test breaksing and, if it passes, we'll know about it. | |
| */ | |
| function runOptionalTest(testName, failedMessage, testFn){ | |
| if(!testFn){ |
| <keymap> | |
| <global> | |
| <keyboard> | |
| <key id="61654">contextmenu</key> | |
| </keyboard> | |
| <mouse> | |
| <leftclick>Select</leftclick> | |
| <rightclick>Back</rightclick> | |
| <middleclick>noop</middleclick> | |
| <doubleclick id="0">noop</doubleclick> |
| var n = 5000000; | |
| var encodedRid = '%2310%3A23'; // #10:23 | |
| console.time('decodeURIComponent 1/2'); | |
| for (var i = 0; i < n; i++) { | |
| decodeURIComponent(encodedRid); | |
| } | |
| console.timeEnd('decodeURIComponent 1/2'); |
| /** | |
| * Example on how to get cursor position programatically with JS | |
| */ | |
| var stdin = process.stdin; | |
| var firstAttempt = true; | |
| function callback() { | |
| var buf = stdin.read(); |