Skip to content

Instantly share code, notes, and snippets.

@ITler
ITler / download-springer.sh
Last active May 2, 2020 07:54
Parse free springer book CSV sheet and download titles
#! /bin/bash
# Input file should be based on downloadable Excel sheets, but saved as CSV file (field_delimiter=; string_delimiter=<empty>)
INPUT_FILE=${1}
INPUT_FILE_CONTENT_START_LINE=${2:-2}
URL_COLUMN_IDX=${3:-19}
assemble_download_file_basename() {
input_file="${1}"
url="${2}"
#! /usr/bin/env bash
COMMIT_MSG_FILE=$1
branch_name=$(git symbolic-ref -q HEAD)
branch_name=${branch_name##refs/heads/}
branch_name=${branch_name:-HEAD}
branch_name=$(echo ${branch_name} | tr '[:lower:]' '[:upper:]')
firstLine=$(head -n1 "${COMMIT_MSG_FILE}")
#! /usr/bin/env bash
# normally first char of prename + surname
users="${@:-jsmith}"
# normally users
group="users"
# normally adm and/or sudo
groups="adm,sudo"
@ITler
ITler / gh_api
Last active October 10, 2019 10:04
Useful shell functions
gh_api() {
local -r gh_api_auth=${GH_API_AUTH}
local -r method=${1:-GET}
local -r path=${2:-user}
shift 2
http --auth "${gh_api_auth}" ${method} "https://api.github.com/${path}" Accept:application/vnd.github.v3+json "${@}"
}
@ITler
ITler / bumpme
Last active February 2, 2019 17:36
concourse tutorial
Sat Feb 2 17:36:53 UTC 2019

Keybase proof

I hereby claim:

  • I am itler on github.
  • I am itler (https://keybase.io/itler) on keybase.
  • I have a public key ASDd1JoBzUOcP38WCb-g3YiJtnK699EMx5ZckYQAQnCKiAo

To claim this, I am signing this object: