Skip to content

Instantly share code, notes, and snippets.

View turboBasic's full-sized avatar
🔮
Focusing

andriy melnyk turboBasic

🔮
Focusing
View GitHub Profile

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@turboBasic
turboBasic / #helpers for Lastpass CLI client (lpass).md
Last active June 20, 2021 15:57
create Lastpass groups and items using CLI client

Helpers for Lastpass CLI client (lpass)

Wrap operations related to creation of accounts in nested Lastpass folders (groups). Those operations have always been tricky in lpass because of cumbersome path separator (\) and shell escaping rules

lpass-add

Creates item with complex path eg. Folder1\Folder2/item.name. Creates parent folder objects if required.

@turboBasic
turboBasic / updateConfluencePage.py
Last active June 2, 2022 20:59
Update Confluence page #confluence #atlassian #rest
#!/usr/bin/env python3
# $ python write_page.py -h
# usage: write_page.py [-h] [-u USER] [-t TITLE] [-f FILE] pageid [html]
# positional arguments:
# pageid Specify the Conflunce page id to overwrite
# html Write the immediate html string to confluence page
# optional arguments:
# -h, --help show this help message and exit
# -u USER, --user USER Specify the username to log into Confluence
@turboBasic
turboBasic / createReusableParameters.groovy
Last active November 2, 2022 06:51
Create reusable parameter definitions in Job DSL script #jenkins #job-dsl
// taken from https://groups.google.com/g/job-dsl-plugin/c/eJvX7G7OwQU?pli=1
def aParam = {
stringParam('aa')
}
def moreParams = {
stringParam('bb')
stringParam('cc')
}
@turboBasic
turboBasic / ansi 256 colors chart.md
Last active June 21, 2025 14:40
Ansi 256 colors chart #pocket #ansi #color
@turboBasic
turboBasic / .profile
Last active January 31, 2021 00:46
pam_env.so - ~/.pam-environment log #pam #linux
LOG_FILE=pam-environment-01.log.md
exec 3>&1
exec 1>> "$LOG_FILE"
printf '\n\n\nLOGIN %s\n=====================\n' "$(date +%Y%m%d-%H%M%S)"
printf '\n\n%s\n----------------\n' .pam_environment
printf '```ini\n'
grep -C2 -- AVAR .pam_environment
@turboBasic
turboBasic / sampleREADME.md
Created January 30, 2021 22:27 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

FVCproductions

INSERT GRAPHIC HERE (include hyperlink in image)

Repository Title Goes Here

Subtitle or Short Description Goes Here

@turboBasic
turboBasic / systemd-journalctl-cheatsheet.md
Last active January 30, 2021 23:27
systemd journalctl cheatsheet #systemd #journalctl #linux

systemd journalctl cheatsheet / tldr

@turboBasic
turboBasic / copyToOtherUserHome.sh
Created January 26, 2021 01:46
Copy files to other user's home #bash
#!/usr/bin/env bash
DEST_USER=${DEST_USER:-user}
DEST_DIR=${DEST_DIR:-/home/$DEST_USER}
files="$(
sudo --login --non-interactive --user $DEST_USER -- \
bash -c "find -maxdepth 1 -type f \\(
-name .profile -o -name .zprofile -o -name .bash\\* -o -name .zsh\\*
\\)"
@turboBasic
turboBasic / backup-all-gpg-keys.md
Last active February 18, 2021 02:15
Backup all secret and public keys from GnuPG keyring #gpg

Backup private & public GnuPG keys

Backup

KEY_ID='[email protected]'

cat <<EOF >"${KEY_ID}...pub+sec.asc" \