Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am kitingchris on github.
  • I am kitingchris (https://keybase.io/kitingchris) on keybase.
  • I have a public key ASAm5-RqU4gFm06RbKNXTiO4BITeJCUsI7n_ijV30GRYEQo

To claim this, I am signing this object:

@kitingChris
kitingChris / index.html
Created May 5, 2016 22:53
Morris Donut with legend
<!DOCTYPE html>
<!--
Created using JS Bin
http://jsbin.com
Copyright (c) 2016 by anonymous (http://jsbin.com/lucemiware/3/edit)
Released under the MIT license: http://jsbin.mit-license.org
-->
@kitingChris
kitingChris / jenkins-github-observer.sh
Last active May 19, 2016 12:43
Jenkins Github observer cron script triggers new build on changes. Useful when webhook is no option.
#!/bin/bash
# crontab -e
# */5 * * * * /path/to/jenkins-github-observer.sh myRepo myJenkinsJob > /dev/null 2>&1
repo=$1
jenkinsJob=$2
remoteUrl=git@github.com:kitingChris/$repo.git
jenkinsGitDir=/srv/jenkins/jobs/$jenkinsJob/workspace/.git
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
@kitingChris
kitingChris / calibre
Last active November 1, 2016 11:12 — forked from razrichter/calibre
Calibre Server upstart script
#! /bin/sh
### BEGIN INIT INFO
# Provides: calibre
# Required-Start: network
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Controls the Calibre content server
# Description: Controls the Calibre content web server
#
@kitingChris
kitingChris / tmux-cheatsheet.markdown
Created December 8, 2016 13:08 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@kitingChris
kitingChris / luksmount
Last active September 10, 2017 15:03
LUKS Mount & Umount scripts
#!/bin/bash
# ------------------------------------------------------------------
# [Christian Ego] luksmount
# Mounts an encrypted LUKS container
# ------------------------------------------------------------------
HELP="\n
Usage:\n
\t$(basename $0) [FILE] [MOUNTPOINT] [FILESYSTEM]\n
\n
sudo chmod go-w ~/ && \
sudo chmod 600 ~/.ssh/* && \
sudo chmod 644 ~/.ssh/*.pub && \
sudo chmod -f 644 ~/.ssh/authorized_keys && \
sudo chmod 644 ~/.ssh/known_hosts && \
sudo chmod 700 ~/.ssh && \
sudo chown $(id -un):$(id -gn) ~/.ssh
@kitingChris
kitingChris / boilerplate-shell-script.sh
Created November 13, 2018 16:25
BOILERPLATE SHELL SCRIPT TEMPLATE
#!/usr/bin/env bash
# ##################################################
# My Generic BASH script template
#
version="1.0.0" # Sets version variable
#
scriptTemplateVersion="1.3.0" # Version of scriptTemplate.sh that this script is based on
# v.1.1.0 - Added 'debug' option
# v.1.1.1 - Moved all shared variables to Utils