Skip to content

Instantly share code, notes, and snippets.

View AnotherProksY's full-sized avatar
👺
Focusing

Kamil AnotherProksY

👺
Focusing
View GitHub Profile
@AnotherProksY
AnotherProksY / group_members.sh
Created April 29, 2021 07:37
Confluence get all users from groups via REST API
#!/bin/bash
declare -a StringArray=("confluence-users" "confluence-administrators")
# I use httpie instead of curl, but you can adapt this script to use cURL.
for group in ${StringArray[@]}; do
output=$(https -b -a 'username:password' https://<base-confluence-url>/rest/api/group/$group/member | sed -e 's/[{}]/''/g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | grep displayName | cut -d ':' -f2 | sed -e 's/^"//' -e 's/"$//' | tr '\n' ',')
echo "$group;$output" >> any_filename_to_store_data.csv
done
@AnotherProksY
AnotherProksY / passgitgpg.md
Created February 15, 2021 00:51 — forked from flbuddymooreiv/passgitgpg.md
Setting up pass on git with a gpg key

The following shell transcript shows how to:

  • Create a GPG key
  • Create a pass database
  • Add git support to the pass database
  • Create a remote git repository
  • Push the pass database to the remote git repository
  • Fetch and display your passwords from another host

It is assumed that the pass package has been installed on both the first and second computers.

@AnotherProksY
AnotherProksY / toolbox.md
Last active September 11, 2021 20:38
Toolbox

Toolbox 🧰

My Daily use tools for working 👨‍💻

brew install vim tmux git pyenv gnupg httpie mosh fzf
brew install --casks macvim tableplus docker gpg-suite typora

Python packages 🐍

@AnotherProksY
AnotherProksY / getopts.sh
Created September 26, 2019 13:13 — forked from rosterloh/getopts.sh
An example of how to use bash getopts
#!/bin/bash
######################################################################
#This is an example of using getopts in Bash. It also contains some
#other bits of code I find useful.
#Author: Linerd
#Website: http://tuxtweaks.com/
#Copyright 2014
#License: Creative Commons Attribution-ShareAlike 4.0
#http://creativecommons.org/licenses/by-sa/4.0/legalcode

SHORTCUTS

Key/Command Description
Tab Auto-complete files and folder names
Ctrl + A Go to the beginning of the line you are currently typing on
Ctrl + E Go to the end of the line you are currently typing on
Ctrl + U Clear the line before the cursor
Ctrl + K Clear the line after the cursor
Ctrl + W Delete the word before the cursor
Ctrl + T Swap the last two characters before the cursor