Skip to content

Instantly share code, notes, and snippets.

View salvatorecordiano's full-sized avatar
🚀
People are everything

Salvatore Cordiano salvatorecordiano

🚀
People are everything
View GitHub Profile
@salvatorecordiano
salvatorecordiano / prepare-commit-msg
Last active November 21, 2017 09:02
Prepending Git commit messages with Jira IDs
#!/bin/bash
# curl -s https://gist.githubusercontent.com/salvatorecordiano/ff73d811c8933c08ea68c1177f3db6c9/raw/6312ceaa840928164afa06e0e42968753b745f61/prepare-commit-msg > .git/hooks/prepare-commit-msg && chmod +x .git/hooks/prepare-commit-msg
COMMIT_MESSAGE=$(cat $1)
PRECOMMIT_MESSAGE=$(git symbolic-ref --short HEAD | grep -Eo "[A-Z0-9]+-[A-Z0-9]+")
RED=`tput setaf 1`
GREEN=`tput setaf 2`
RESET=`tput sgr0`
if [ ! -z "$PRECOMMIT_MESSAGE" ]; then
<?php
header('Content-Type: application/json');
$content = file_get_contents('php://input');
$update = json_decode($content, true);
if (!$update) {
exit;
}
$chatId = $update['message']['chat']['id'] ?? null;
# first way
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"