Skip to content

Instantly share code, notes, and snippets.

View pid's full-sized avatar

Sascha pid

  • Baden-Württemberg, Germany
View GitHub Profile
@pid
pid / speedtest.js
Created December 23, 2014 23:17
bcrypt speedtest
var bcrypt = require('bcrypt');
console.time('timer');
bcrypt.hashSync('bacon', bcrypt.genSaltSync(+process.argv[process.argv.length-1] || 16));
console.timeEnd('timer');

Keybase proof

I hereby claim:

  • I am pid on github.
  • I am pid (https://keybase.io/pid) on keybase.
  • I have a public key whose fingerprint is C1D6 E534 E23C F05A 4E13 DE97 88C9 24B7 8906 C803

To claim this, I am signing this object:

<html>
<head>
<style>
b {
font-weight: normal;
}
</style>
<script src="http://cdn.jsdelivr.net/handlebarsjs/2.0.0/handlebars.js"></script>
</head>
<body>
@pid
pid / trello.js
Created November 10, 2014 20:12
Trello Developer Challenge https://trello.com/jobs/developer
/**
* @author Sascha Droste
* @description trello developer challenge
*
*/
var trello = 956446786872726;
/**
# Note: if you want to run multiple meteor apps on the same server,
# make sure to define a separate port for each.
# Upstreams
upstream gentlenode {
server 127.0.0.1:58080;
}
# HTTP Server
server {
var last = function(fn, l) {
return function() {
var args = Array.prototype.slice.call(arguments);
args.push(l);
return l = fn.apply(null, args);
};
};
@pid
pid / README.md
Last active August 29, 2015 14:08 — forked from iki/README.md

Update global top level npm packages

Problem

npm update -g updates all global packages and their dependencies, see npm/npm#6247.

Solution

  1. Either use the shell script or windows batch here instead.
#!/bin/bash
##############################################
# modified version of original http://media-glass.es/ghost-sitemaps/
# for ghost.centminmod.com
# http://ghost.centminmod.com/ghost-sitemap-generator/
##############################################
url="www.CHANGE_THIS.com"
webroot='/VAR/CHANGE_THIS'
path="${webroot}/sitemap.xml"
user='nginx' # web server user
@pid
pid / default.vcl
Last active August 29, 2015 14:08 — forked from lkarsten/default.vcl
varnish vcl for ghost blogging platform
#
# Varnish VCL file for Ghost blogging platform.
# http://ghost.org/
#
# Written for Ghost v0.3.0.
#
# This is a low-hanging-fruit type of VCL. TTL of objects are overridden to 2
# minutes, and everything below /ghost/ is pass()-ed so the user sessions
# work.
#
#!/bin/bash
##############################################
# modified version of original http://media-glass.es/ghost-sitemaps/
# for ghost.centminmod.com
# http://ghost.centminmod.com/ghost-sitemap-generator/
##############################################
url="ghost.centminmod.com"
webroot='/home/nginx/domains/ghost.centminmod.com/public'
path="${webroot}/sitemap.xml"
user='nginx' # web server user