Skip to content

Instantly share code, notes, and snippets.

@PanMan
PanMan / test_gc.js
Created April 6, 2016 20:40
Take some memory and release it to test the GC
var testString="0123456789";
setInterval(function (){
console.log("Mem:", Math.round(process.memoryUsage().rss/1000000), " Mb ", process.memoryUsage(), "Len:",testString.length);
}, 1 * 1000);
for (i=0;i<20;i++){
testString=testString+testString; //Double: 10 * 10 ^
}
//Now testString=10.000.000 characters, which is roughly 20 Mb.
@PanMan
PanMan / Cryptoseal
Created October 21, 2013 14:52
CryptoSeal Privacy Consumer VPN service terminated with immediate effect
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
CryptoSeal Privacy Consumer VPN service terminated with immediate effect
With immediate effect as of this notice, CryptoSeal Privacy, our consumer VPN service, is terminated. All cryptographic keys used in the operation of the service have been zerofilled, and while no logs were produced (by design) during operation of the service, all records created incidental to the operation of the service have been deleted to the best of our ability.
Essentially, the service was created and operated under a certain understanding of current US law, and that understanding may not currently be valid. As we are a US company and comply fully with US law, but wish to protect the privacy of our users, it is impossible for us to continue offering the CryptoSeal Privacy consumer VPN product.
@PanMan
PanMan / deploy.rb
Created October 31, 2012 16:41
cap recipe for deploying non rails sites to Media Temple grid servers -Fixed!
# Fork as symlink is changed to create_symlink - took a bit to find out
# After running cap deploy:cold, You'll need to remove all files from the
# domains/yourdomain.com/html directory and turn the html directory into a
# symlink that links to ./current which is also a symlink setup by capistrano.
#
# Configure these
set :site, "12345" # this is your site number, for example if your access domain is s12345.gridserver.com
set :application, "example.com" # typically the same as the domain