$ openssl genrsa -out mykey.pem 1024 # build rsa private key
Generating RSA private key, 1024 bit long modulus
............................................................++++++
....++++++
$ openssl rsa -in mykey.pem -pubout > mykey.pub # build --BEGIN PUBLIC KEY-- format public key
writing RSA key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function stdout { | |
echo "$(date "+%H:%m:%s") $@" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mvn help:evaluate -Dexpression=project.version | grep -Ev 'INFO|WARNING' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# downstream, a tool to trigger gitlab CI pipelines | |
# | |
# DESCRIPTION | |
# | |
# downstream offers a way to trigger a pipeline on a specific branch of one or multiple projects | |
# Project are identified by their numerical IDs. | |
# Project IDs can be found under Settings->General->General project settings | |
# When a branch is not found, it is created from the master and then the pipeline is triggered |
I hereby claim:
- I am bench on github.
- I am benchenebault (https://keybase.io/benchenebault) on keybase.
- I have a public key whose fingerprint is 491D A06E 23F7 CE36 6434 615F EA54 A69B 6EF8 462A
To claim this, I am signing this object:
update-alternatives
maintains symbolic links determining default commands
This is a reminder to install java and javac alternatives.
Install java compiler alternatives
$ sudo update-alternatives --install /usr/bin/javac javac /home/bchenebault/Apps/jdk1.5.0_22/bin/javac 1
$ sudo update-alternatives --install /usr/bin/javac javac /home/bchenebault/Apps/jdk1.6.0_45/bin/javac 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type PanicFilter struct { | |
mq.Handler | |
logger *log.Logger | |
} | |
func (f PanicFilter) Handle(d amqp.Delivery) error { | |
defer func() { | |
if panic := recover(); panic != nil { | |
defer d.Nack(false, false) // might have been ACK/NACK already, but for safety. | |
_, file, line, ok := runtime.Caller(4) |
dpkg is the acronym for debian package
. It's the package management system of Debian and its derivatives.
apt-get means Advanced Packaging Tool
. It is a front-end for dpkg that automates installation and configuration.
A Debian package ".deb" always follows the convention [softname]_[version]_[architecture].deb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check if jq is installed | |
if ! type "jq" > /dev/null; then | |
echo please install jq | |
fi | |
title="$(git log --oneline | head -1 | cut -f 2- -d ' ')" | |
source_branch="$(git branch | grep '*' | cut -f 2 -d ' ')" | |
target_branch=master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Use the following script using sudo to install multiple golang installations on your debian | |
# update-alternatives creates, removes, maintains and displays information about the symbolic links comprising the alternatives system | |
# Usage : sudo ./full_golang_install.sh | |
# | |
if [[ $(id -u) -ne 0 ]] ; then echo "This script should be run using sudo or as the root user" ; exit 1 ; fi | |
## Configuration and init |
NewerOlder