Git jira hook

This is a git hook to update JIRA server with commit info. This is a simple set of bash scripts which can be used to update a jira server with git commit information. This work as following: When a user writes a commit message in git it used the name of a JIRA issue in the format CODE-XXXX (ie. JVIN-7893). Multiple issues separated by comma are supported. Each will be updated....

September 26, 2019 · len

Router reboot wrapper script

This is a memory sink article. I found this nice python script which reboots a B525 router and wanted to write a wrapper script around it. #!/bin/bash # refs:, RUNDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" MAX_ATTEMPTS=10 ATTEMPT=0 TIMEOUT=60 LOCK_FILE=$RUNDIR/lock LOCAL= if [ -f $LOCK_FILE ]; then echo "Already running, exiting" exit -1 fi function finish { rm $RUNDIR/lock } trap finish EXIT touch $RUNDIR/lock while (( $ATTEMPT < $MAX_ATTEMPTS )) do DATE=$(date +%Y%d%m-%H%M%S) echo -e "GET http://$REMOTE HTTP/1....

August 24, 2019 · len

Simple pomodoro script

This is a very basic pomodoro script I am using to avoid getting in a fixed position for hours at a time: <pre lang="shell"> #!/bin/bash UNIT=5 UNIT_CNT=5 PAUSE=6 notify-send -i clock "Starting interval..." for i in $(seq $UNIT_CNT); do sleep ${UNIT}m let c=$i*$UNIT notify-send -i clock "$c minutes" done (for i in $(seq $PAUSE); do let c=$PAUSE-$i+1; echo -n "Pause ${c}m"; echo -e '\f'; sleep 1m; done; echo -e '\f'; echo "Work";) | sm -

December 22, 2016 · len

(X)Ubuntu microphone mute/unmute script

The goal of this script was to have a simple script, binded with a shortcut which allows to mute/unmute all the microphones and to display a nice notification in the process. This is the simplest version working on xubuntu 14.04 with pulseaudio. <pre lang="bash">#!/bin/bash ACTION=1 #1 mute, 0 unmute SCNT=$(pacmd list-sources | grep muted | wc -l) MUTED=$(pacmd list-sources | grep muted | grep yes) if [ $? == 0 ]; then ACTION=0 notify-send -i microphone-sensitivity-medium "Microphone" "Unmutting $SCNT sources....

May 29, 2014 · len