Skip to content

Instantly share code, notes, and snippets.

View colorchestra's full-sized avatar
💭
can you not?

colorchestra

💭
can you not?
View GitHub Profile
@colorchestra
colorchestra / get-gitlab-user-id-by-name.sh
Created August 2, 2019 16:05
Uses the Gitlab API and jq to get the Gitlab User ID by supplying the username.
#!/bin/bash
# requires curl and jq
# assumes usage of Gitlab API v4
# hella hacky
url="https://git.example.net"
token="abcdefghijklmnop"
username="$1"
# output is always paginated - get total number of pages from http header
set $mod Mod1
set $mod4 Mod4
set $tag1 "1: WORK"
set $tag2 "2: OTHER"
set $tag3 "3: COMM"
set $tag4 "4: UTILS"
set $tag5 "5: SPTFY"
# Font for window titles. Will also be used by the bar unless a different font