Skip to content

Instantly share code, notes, and snippets.

View hpherzog's full-sized avatar

Hans-Peter Herzog hpherzog

  • Ludwigshafen, Germany
View GitHub Profile
@hpherzog
hpherzog / debian-rabbitmq.sh
Created March 3, 2014 18:25
Install rabbitmq on debian.
#!/bin/sh
(cat <<-SRC
# rabbitmq
# http://www.rabbitmq.com/install-debian.html
deb http://www.rabbitmq.com/debian/ testing main
SRC
) > /etc/apt/sources.list.d/rabbitmq.list
cd /tmp
@hpherzog
hpherzog / custom-error-node-js.js
Last active August 29, 2015 14:02
How to inherit a custom error object in node.js.
"use strict";
var util = require("util");
var errors = {};
errors.ErrorA = function ErrorA(message) {
@hpherzog
hpherzog / wheezy-redis.sh
Last active August 29, 2015 14:04
Install redis on debian wheezy
#!/bin/sh
apt-get -t wheezy-backports -y install redis-server
@hpherzog
hpherzog / jessie-sources.list
Created September 13, 2015 10:38
Default package sources for debian jessie
# default
deb http://ftp.de.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.de.debian.org/debian/ jessie main contrib non-free
# security updates
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
# updates
deb http://ftp.de.debian.org/debian/ jessie-updates main contrib non-free
@hpherzog
hpherzog / jessie-node-0-10-x.sh
Last active September 13, 2015 12:30
Install node.js version 0.10.x on debian jessie
#!/bin/sh
curl --silent --location https://deb.nodesource.com/setup_0.10 | bash -
apt-get -y install nodejs
@hpherzog
hpherzog / jessie-default-dev.sh
Last active September 15, 2015 07:57
Install default packages on debian jessie
#!/bin/sh
(cat <<-SRC
# default repo
deb http://ftp.de.debian.org/debian/ jessie main contrib non-free
deb-src http://ftp.de.debian.org/debian/ jessie main contrib non-free
# security updates
deb http://security.debian.org/ jessie/updates main contrib non-free
deb-src http://security.debian.org/ jessie/updates main contrib non-free
@hpherzog
hpherzog / require-ensure.js
Created September 23, 2015 18:46
webpack require.ensure shim to use in node.js
if(typeof(require.ensure) !== "function")
{
require.ensure = function(modules, callback)
{
callback(require);
}
}
@hpherzog
hpherzog / create-ca-signed-ssl-cert.sh
Last active December 14, 2015 04:48
Create a self or ca signed ssl certificate with openssl on debian wheezy
#!/bin/sh
#####################################################
# #
# Create a ca signed ssl certificate with CA.pl #
# #
#####################################################
# http://www.debian-administration.org/article/618/Certificate_Authority_CA_with_OpenSSL
#!/bin/sh
apt-get -y install \
tomcat7 \
tomcat7-admin \
openjdk-7-jre-headless
@hpherzog
hpherzog / debian-webmin.sh
Last active December 17, 2015 05:39
Install webmin on debian
#!/bin/sh
(cat <<-SRC
# webmin repository
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
SRC
) > /etc/apt/sources.list.d/webmin.list