Skip to content

Instantly share code, notes, and snippets.

View stolsma's full-sized avatar
🙂
Coding away...

Sander Tolsma stolsma

🙂
Coding away...
View GitHub Profile

These instructions work for the Raspberry Pi running Raspbian (hard float) and create a hardware optimized version of NodeJS for the Raspberry PI, (and include a working install and NPM!!!):

  1. Install Raspbian - http://www.raspberrypi.org/downloads

  2. Install the necessary dependecies:

sudo apt-get install git-core build-essential

(If you just installed git then you need to administer your git identity first, else adding the patches below will fail!!!)

@stolsma
stolsma / readme.md
Last active January 16, 2020 11:09 — forked from ubergesundheit/readme.md
systemd traefik.service

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 / consul.service
Created July 24, 2017 19:30 — forked from rossedman/consul.service
Consul Installation
#
# This needs to be installed here:
# /etc/systemd/system/consul.service
#
[Unit]
Description=consul
Requires=network-online.target
After=network-online.target
@stolsma
stolsma / pimp_prompt.sh
Created September 27, 2011 07:08 — forked from jamiew/pimp_prompt.sh
Put this in your ~/.bash_profile or ~/.bashrc file. Then type source ~/.bashrc or source ~/.bash_profile to reload.
parse_git_branch() {
ref=$(git symbolic-ref -q HEAD 2> /dev/null) || return
printf "${1:-(%s)}" "${ref#refs/heads/}"
}
pimp_prompt() {
local BLUE="\[\033[0;34m\]"
local BLUE_BOLD="\[\033[1;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
@stolsma
stolsma / clone.js
Created September 25, 2011 18:51 — forked from polotek/clone.js
Real, deep copied objects.
function hasOwnProperty(key) {
if(this[key]) {
var proto = this.prototype;
if(proto) {
return ((key in this.prototype) && (this[key] === this.prototype[key]));
}
return true;
} else {
return false;
}
@stolsma
stolsma / StackScript.sh
Created September 20, 2011 14:13 — forked from visnup/StackScript.sh
node.js knockout 2011 StackScript
#!/bin/bash
# <UDF name="ssh_key" Label="Paste in your public SSH key" default="" example="" optional="false" />
# root ssh keys
mkdir /root/.ssh
echo $SSH_KEY >> /root/.ssh/authorized_keys
chmod 0700 /root/.ssh
# update to latest
@stolsma
stolsma / pr.md
Last active September 14, 2015 09:44 — forked from piscisaureus/pr.md
Checkout github pull requests locally

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:

#!/bin/bash
#
# chkconfig: - 55 45
# init.d example for Forever & Node
#
# modeled after
# https://gist.github.com/jinze/3748766
#
# supports vhost
#