Skip to content

Instantly share code, notes, and snippets.

Avatar

Dennis Kaarsemaker seveas

View GitHub Profile
View stdout
#!/bin/bash
if [ "$1" == "--noop" ]; then
NOOP=1
VERBOSE=1
fi
# We only support stretch or newer
if [ "$(lsb_release -cs)" == "jessie" ]; then
exit 0
View .deploy
#!/bin/bash
#
# Usage:
#
# To deploy the current branch to production
#
# .deploy
#
# To deploy the current branch to a different environment
#
View scattergather.go
package scattergather
import (
"context"
"sync"
)
type ScatteredFunction func(context.Context, ...interface{})(interface{}, error)
type ScatterGather struct {
@seveas
seveas / rover.py
Last active Jul 1, 2017 — forked from andywarburton/rover.py
simple script for controlling motors and lights with piborg zero motor controller and a raspberry pi
View rover.py
#!/usr/bin/env python
# coding: Latin-1
# Load library functions we want
from inputs import get_gamepad
import piconzero as pz
import time
import sys
import random
import colorsys
View sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://nl.archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://nl.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://nl.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb-src http://nl.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
View bind.conf
options {
directory "/home/dennis/pdns-bug/inst/var/run/pdns-server/";
};
zone "example.com" IN {
type master;
file "example.com.zone";
};
View gitweb.conf
<VirtualHost 10.0.0.1:80>
ServerName git.example.com
DocumentRoot /gitroot
# smart transport
SetEnv GIT_PROJECT_ROOT /gitroot
ScriptAlias /git/ /usr/libexec/git-core/git-http-backend/
View gist:7056982f8c0deaefb75b
1 cherry-pick
1 credential-cache
1 gc
1 help
1 minitrue
1 mv
1 rm
1 shortlog
1 staus
1 unpack
View krakenmerge.sh
cd /tmp
mkdir foo
cd foo
git init
fortune > bar
git add bar
git commit "-m$(fortune)"
git tag base
for i in $(seq 4096); do echo "--- $i ---"; git checkout -b branch-$i base; fortune > bar-$i; git add bar-$i; git commit "-m$(fortune)"; done
git checkout base
View post-receive
[dkaarsemaker@blog-001 ~]$ cat /srv/blog/blog.git/hooks/post-receive
#!/bin/bash
BLOG_PATH="/srv/blog";
REPO_PATH="${BLOG_PATH}/blog.git/";
WWW_PATH="${BLOG_PATH}/current";
CURRENT_SHA1=`cat ${REPO_PATH}/refs/heads/master`;
PUBLISH_DIR="${BLOG_PATH}/${CURRENT_SHA1}";
WORK_DIR="${PUBLISH_DIR}_workdir"