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 LinkedList { | |
with T; | |
LinkedListNode<T>:first; | |
LinkedListNode<T>:last; | |
int:length; | |
append(T:value) { | |
var node = new LinkedListNode<T>(self, value); | |
self.length = self.length + 1; |
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
node node_modules/.bin/benchmark-octane | |
hostname : bastamac.local | |
node version : v0.10.33 | |
V8 version : 3.14.5.9 | |
platform & arch : darwin x64 | |
config : { target_defaults: | |
{ cflags: [], | |
default_configuration: 'Release', | |
defines: [ 'OPENSSL_NO_SSL2=1', 'OPENSSL_NO_SSL3=1' ], |
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' ], |
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
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
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
-----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
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
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
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') { |