Skip to content

Instantly share code, notes, and snippets.

View hayka-pacha's full-sized avatar

HKPA hayka-pacha

  • Somewhere, Cyberspace.
View GitHub Profile
@hayka-pacha
hayka-pacha / get_latest_release.sh
Created October 12, 2021 19:36 — 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
@hayka-pacha
hayka-pacha / slack.sh
Created August 24, 2019 11:40 — forked from andkirby/slack.sh
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.github.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user