Skip to content

Instantly share code, notes, and snippets.

Avatar
🙂
Coding away...

Sander Tolsma stolsma

🙂
Coding away...
View GitHub Profile
@stolsma
stolsma / readme.md
Last active Jan 16, 2020 — forked from ubergesundheit/readme.md
systemd traefik.service
View readme.md

systemd Service Unit for Traefik

Adapted from the forked gist and this blog. Adjusted to our own implementation.

The provided file should work with systemd version 219 or later. It might work with earlier versions. The easiest way to check your systemd version is to run systemctl --version.

Instructions

@stolsma
stolsma / 1-Install.md
Last active Oct 24, 2018
Centos repo files for installing KVM, docker, kubernetes, Helm and Tiller
View 1-Install.md

Installing KVM, libvirt, Docker-CE and Kubernetes on Centos 7.x

First of all be root while doing this... sudo su

Set hostname

Set the hostname:

hostnamectl set-hostname 'k8s-master'

@stolsma
stolsma / consul.service
Created Jul 24, 2017 — forked from rossedman/consul.service
Consul Installation
View consul.service
#
# This needs to be installed here:
# /etc/systemd/system/consul.service
#
[Unit]
Description=consul
Requires=network-online.target
After=network-online.target
@stolsma
stolsma / pr.md
Last active Sep 14, 2015 — forked from piscisaureus/pr.md
Checkout github pull requests locally
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

View Install Community Node.js.md

Install first for ubuntu:

sudo apt-get install build-essential libssl-dev curl git-core

Compile the required Node.js version and put in global reach:

# install Node.js from Github (replace 4.0.0 with required version)
git clone https://github.com/nodejs/node.git node4.0.0
View Install iojs.md

Install first for ubuntu:

sudo apt-get install build-essential libssl-dev curl git-core

Compile the required iojs version and put in global reach:

# install iojs from Github (replace 1.3.0 with required version)
git clone https://github.com/iojs/io.js.git iojs
@stolsma
stolsma / Debug.md
Last active Aug 29, 2015
Enable, disable and set debug port from running process
View Debug.md

process._debugProcess(process.pid)

process._debugPause()

process._debugEnd()

process.debugPort : is getter and setter of debugport

See:

@stolsma
stolsma / node init script.md
Last active Aug 29, 2015
How to create a node init script with forever
View node init script.md

Init Script

From: source

Init scripts hopefully need no explanation. Scripts reside in /etc/init.d with root ownership and executable permissions. e.g.:

sudo su
cp my-application-script /etc/init.d/my-application
View forever-initd-example.sh
#!/bin/bash
#
# chkconfig: - 55 45
# init.d example for Forever & Node
#
# modeled after
# https://gist.github.com/jinze/3748766
#
# supports vhost
#
@stolsma
stolsma / installNodejs.md
Last active Oct 11, 2015
Compile and install receipe for ubuntu
View installNodejs.md

Install first for ubuntu:

sudo apt-get install build-essential libssl-dev curl git-core

Compile the required node version and put in global reach:

# install nodejs from Github (replace 0.8.9 with required version)
git clone git://github.com/joyent/node.git node0.8.9
You can’t perform that action at this time.