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

openssl recipes

These last days I had to tinker with openssl a lot and this is a short memory reminder of the params. PKCS#7 manipulation Verify pkcs#7 signature #the -noverify means do not verify the certificate chain, this will only verify the signature not the originating certificate openssl smime -inform DER -verify -noverify -in signature.p7s Show the structure of the file (applies to all DER files) #for debuging openssl asn1parse -inform DER -i -in signature....

January 9, 2018 · len

Remove old kernels

for i in $(dpkg --list | grep linux-image | cut -c5-48 | grep -v $(uname -r) | grep -v linux-image-generic); do apt-get remove --purge -y $i; done

May 28, 2017 · len

Simple hdmi activate script

This is a simple script I bound to ‘meta+F7’ to activate a second hdmi display I am using: <pre lang="shell"> INTERNAL=eDP1 EXTERNAL=HDMI2 LOCK=/tmp/${EXTERNAL}.on disper -l | grep $EXTERNAL function on { disper -e -d $INTERNAL,$EXTERNAL -r 1920x1080,1920x1080 touch $LOCK } function off { disper -s -d $INTERNAL -r auto rm -f $LOCK } if [ $? -eq 1 ]; then #there is no EXTERNAL, run single command off elif [ -f $LOCK ]; then off else on fi

December 22, 2016 · len

Parsing network stream into http request/response

The need was to convert the network stream into clear text http request/responses while doing some decoding of the response body. For instance: request uri + queryString => response body Capture the stream – easy using tcpdump Filter the http stream – easy using wireshark with a tcp.port eq 80 filter Export http #1. using wireshark file -> export objects -> http. This works fine only for files. It does not work for POST requests....

June 22, 2016 · len

Ubuntu 16.04

I’we used ubuntu since edgy days and migrating from gentoo. Things got better each time, until they started getting worse or until I started to expect not to have to fix and patch each time. So now I don’t feel like giving any impression, just a list of bugs: sound is sometimes not working after reboot. This is due to the fact that the sound card order changes. One needs to add: options snd-hda-intel id=HDMI index=-2 in /etc/modprobe....

May 25, 2016 · len

Searching for signal

For the last few years, one of the tool I have greatly used is a Huawei E587 modem. It’s a great little device which gave me a lot of freedom. Even if it is quite old, it outperforms, even without an external antenna any smartphone I used for tethering and especially my new Samsung Galaxy S5 Neo which, as a parenthesis, has one of the poorest software I have ever seen, reminds me of a circa 2000 windows pre-installed on a laptop and filled with junkware....

February 29, 2016 · len

Running chrome in docker with audio

The goal is to run google-chrome in a docker container with audio support. I did this trying to get skype.apk to run in archron since skype for linux does not support conferencing anymore. Even if running skype in archron did not seemed to work chrome runs flawlessly with audio support via pulse: So here is the Dockerfile: <pre lang="bash"> FROM ubuntu:14.04 MAINTAINER RUN apt-get update && apt-get install -y wget pulseaudio && echo "deb http://dl....

February 28, 2016 · len

Ensure rPi connectivity

The problem: make sure I can connect to my raspberry pi B+ even if no network is available or network change. The idea: set a static IP. First some information: running raspbian 8.0 (cat /etc/issue) there is no need for a crossover UTP cable if you connect directly to the device you can use a normal cable IP configuration is delegated from /etc/network/interfaces to the dhcpcd daemon. This is why the eth0 is set on manual....

January 8, 2016 · len