Skip to content

Instantly share code, notes, and snippets.

View kuba--'s full-sized avatar
☮️
stop war

Kuba Podgórski kuba--

☮️
stop war
View GitHub Profile
@kuba--
kuba-- / service.md
Last active March 11, 2017 13:45 — forked from naholyr/_service.md

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@kuba--
kuba-- / git-reset.sh
Last active October 1, 2021 06:57 — forked from nicktoumpelis/repo-rinse.sh
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@kuba--
kuba-- / get_latest_release.sh
Created August 10, 2018 17:35 — forked from lukechilds/get_latest_release.sh
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4