Skip to content

Instantly share code, notes, and snippets.

@leitu
leitu / Makefile
Created October 22, 2018 06:41 — forked from cjbarker/Makefile
Makefile for cross-compiling Golang. Just update BINARY var in Makefile and create empty vars in main.go for Version and Build
# ########################################################## #
# Makefile for Golang Project
# Includes cross-compiling, installation, cleanup
# ########################################################## #
# Check for required command tools to build or stop immediately
EXECUTABLES = git go find pwd
K := $(foreach exec,$(EXECUTABLES),\
$(if $(shell which $(exec)),some string,$(error "No $(exec) in PATH)))
@leitu
leitu / checkJenkins.sh
Created January 13, 2018 01:31 — forked from julianchurchill/checkJenkins.sh
A bash script to query a Jenkins server. Use like this: 'checkJenkins.sh <jobname>' and it will query the server with the given job name every 30s. Use like this: 'checkJenkins.sh <jobname> tmux' and it will query the server once and output tmux coloured messages appropriate to display in a tmux status bar. E.g. add this to your .tmux.conf 'set …
#!/bin/bash
CONSOLE_RED="\033[2;31m"
CONSOLE_GREEN="\033[2;32m"
CONSOLE_CLEAR="\033[0m"
JENKINS_SERVER=http://my_jenkins_server
JOB=$1
JOB_QUERY=/job/${JOB}
@leitu
leitu / Gitd
Last active August 29, 2015 14:14
#!/bin/sh
#
# Startup/shutdown script for Git Daemon
# chkconfig: 345 56 10
#
# description: Startup/shutdown script for Git Daemon
#
. /etc/init.d/functions
DAEMON=/usr/libexec/git-core/git-daemon