Skip to content

Instantly share code, notes, and snippets.

@zaro
zaro / mongo-express-dokku.md
Created November 2, 2022 08:06
Installing mongo-express in dokku
  1. Create new app

    dokku apps:create mongo-express

  2. Link database to the app

    dokku mongo:link database mongo-express

  3. Deploy existing container

@zaro
zaro / index.html
Last active January 14, 2022 14:01
Map vs Set vs Object vs Array.find for loopups #jsbench #jsperf (http://jsbench.github.io/#e0fec52079bf0182f371d82ee90ca946) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Map vs Set vs Object vs Array.find for loopups #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@zaro
zaro / index.js
Created February 16, 2015 12:15
v0.12.0 segmentation fault in new Buffer(string, encoding)
var binding ;
try {
//binding = require('./build/Release/htmlstrip.node')
} catch(e){
//binding = require('./build/Debug/htmlstrip.node')
}
module.exports.html_strip = function(html,options){
var input;