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
| """BBEdit UNIX filter that wraps one or more optionally-indented, commented | |
| lines to 79 chars, preserving indentation. | |
| Just select all the lines (in their entirety) the comment spans, and invoke. | |
| Works with #, --, and //-style comments. | |
| For example, this... :: | |
| # Upping this to 10000 makes it 3x faster. 10000 takes 15.936s. 5000 takes 16.303s. |
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
| // this is crazy | |
| Function.prototype.callMeMaybe = function(ctx) { | |
| if (Math.random() > .5) { | |
| return this.apply(ctx, Array.prototype.slice.call(arguments, 1)); | |
| } | |
| }; | |
| function square(n) { | |
| return n * n; | |
| } |
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 notify(title, body, icon, callback) { | |
| if (window.Notification) { | |
| function donotify() { | |
| var notification = new Notification(title, { | |
| body: body, | |
| icon: icon | |
| }); | |
| notification.onclick = callback; | |
| } | |
| if (Notification.permission === 'granted') { |
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 pt=performance.timing,rs=pt.responseStart;console.log([pt.domLoading-rs,pt.responseEnd-rs,pt.domContentLoadedEventStart-rs,pt.domContentLoadedEventEnd-rs,pt.loadEventStart-rs,pt.loadEventEnd-rs].join(','));location.reload() |
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 irc = require('irc'); | |
| var client = new irc.Client('irc.mozilla.org', 'carly_rae_jenkins', { | |
| channels: ['#amo', '#breakpad'], | |
| }); | |
| function contains(message, list) { | |
| for(var i=0;i<list.length;i++) { | |
| var l = list[i]; | |
| if(message.indexOf(l) > -1) | |
| return true; |
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
| -----BEGIN PGP MESSAGE----- | |
| Version: Keybase OpenPGP v0.1.12 | |
| Comment: https://keybase.io/crypto | |
| wcFMA7LsuxndRu81ARAAvAZ2D2ODxY9mzO8Q7A/JqMrWzm1XJkh9Q6t1hvKN2t7P | |
| jhUBWzfZbhdDEL1klQ9/+08QQAqEcuhtTRvYUv1l2R/SjD9fNST9jPs3kwYml63J | |
| c8GwrXRUA3GcV3DrY27GdgqAiooEhzGMgFZhj4S+ApwrJLE3jWb73lEVhZmhkPJn | |
| CCTcr7nteSjHEBnijCwNMp9uB9ioe1A7MtIBsd8PzwCI7TY3Ma9St627BgrbaO3i | |
| dqKpFqnXR3ba8D+ty6QWFCe60udMvTxYj8OOcEwydHq3KGdbK5W/NvRgABQS+itt | |
| kYl7RrDqEvU6H00c/oRZc5dyhayyJh0+WodZHsbgbJusanDCsJ7sShk4/5ulvGpj |
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
| Object.keys(Timing.files).forEach(function(file) { | |
| console.log(file + Array(100 - file.length).join('-')); | |
| var markers = Timing.markers[file]; | |
| markers.forEach(function(marker, i) { | |
| console.log( | |
| marker.name + | |
| Array(100 - marker.name.length).join(' ') + | |
| (i !== markers.length - 1 ? | |
| markers[i + 1].start - marker.start : | |
| 0) |
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
| bastamac:hhvm matt$ cmake . -DCMAKE_CXX_COMPILER=$(brew --prefix gcc48)/bin/g++-4.8 -DCMAKE_C_COMPILER=$(brew --prefix gcc48)/bin/gcc-4.8 -DCMAKE_ASM_COMPILER=$(brew --prefix gcc48)/bin/gcc-4.8 -DLIBIBERTY_LIB=$(brew --prefix gcc48)/lib/x86_64/libiberty-4.8.a -DCMAKE_INCLUDE_PATH="/usr/local/include:/usr/include" -DCMAKE_LIBRARY_PATH="/usr/local/lib:/usr/lib" -DLIBEVENT_LIB=$(brew --prefix libevent)/lib/libevent.dylib -DLIBEVENT_INCLUDE_DIR=$(brew --prefix libevent)/include -DICU_INCLUDE_DIR=$(brew --prefix icu4c)/include -DICU_LIBRARY=$(brew --prefix icu4c)/lib/libicuuc.dylib -DICU_I18N_LIBRARY=$(brew --prefix icu4c)/lib/libicui18n.dylib -DICU_DATA_LIBRARY=$(brew --prefix icu4c)/lib/libicudata.dylib -DREADLINE_INCLUDE_DIR=$(brew --prefix readline)/include -DREADLINE_LIBRARY=$(brew --prefix readline)/lib/libreadline.dylib -DCURL_INCLUDE_DIR=$(brew --prefix curl)/include -DCURL_LIBRARY=$(brew --prefix curl)/lib/libcurl.dylib -DBOOST_INCLUDEDIR |
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
| // Today: | |
| var some_object = {'error': 'hey'}; | |
| console.error('oh no blah blah ' + some_object); | |
| // prints: oh no blah blah [object Object] | |
| // But then debug: | |
| Object.prototype.valueOf = function() {return JSON.stringify(this);}; | |
| // then later | |
| var some_object = {'error': 'hey'}; |
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
| ./out/Release/node node_modules/.bin/benchmark-octane | |
| hostname : bastamac.local | |
| node version : v0.13.0-pre | |
| V8 version : 3.29.93.1 | |
| platform & arch : darwin x64 | |
| config : { target_defaults: | |
| { cflags: [], | |
| default_configuration: 'Release', | |
| defines: [ 'OPENSSL_NO_SSL2=1' ], |