All your notes, scripts, config files and snippets deserve version control and tagging!
gist is a simple bash script for gist management.
It is lightweight(~700LOC) and dependency-free! Helps you to boost coding workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent | |
| # download this script an make it executable with `chmod +x create_ssh | |
| if [ -n "$1" ]; then | |
| COMMENT=$1 | |
| else | |
| COMMENT=$USER | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # docs.flatpak.org | |
| # https://docs.flatpak.org/en/latest/tips-and-tricks.html#testing-an-app-with-a-different-runtime | |
| # | |
| # Tips and Tricks — Flatpak documentation | |
| # | |
| # This page explains a few useful features of the Flatpak CLI. | |
| # Testing an app with a different runtime¶ | |
| # | |
| # You can (for testing) run an application with a different runtime than it typically uses. For instance, to run stable gedit with the latest unstable gnome runtime you can do: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # check for root access | |
| SUDO= | |
| if [ "$(id -u)" -ne 0 ]; then | |
| SUDO=$(command -v sudo 2> /dev/null) | |
| if [ ! -x "$SUDO" ]; then | |
| echo "Error: Run this script as root" | |
| exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Checks if you have the right privileges | |
| if [ "$USER" = "root" ] | |
| then | |
| # CHANGE THIS PARAMETERS FOR A PARTICULAR USE | |
| PERS_HOME="/home/" | |
| PERS_SH="/bin/bash" |
Here we create the master key. We want only Certify capability: we use the master key only to create the subkeys, Sign - Encrypt - Authenticate capabilities will be assigned to the subkeys.
Run the following command to start the master key generation process. Select the set your own capabilities creation process (type 8)
▶ gpg --full-generate-key --expert
gpg (GnuPG) 2.2.9; Copyright (C) 2018 Free Software Foundation, Inc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -euo pipefail | |
| DOCKER_VERSION= | |
| OS_ARCH="$(dpkg --print-architecture)" #amd64 | |
| OS_TYPE="$(uname -s | tr '[:upper:]' '[:lower:]')" #linux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -e | |
| success() { | |
| printf "\\033[32m ✔ \\033[0m\\n" | |
| } | |
| fail() { | |
| printf "\\n\\033[31m ✖ \\033[0m $1\\n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Install latest version of golang | |
| # | |
| # https://gist.github.com/eplord/7b1d2da1fbc7eb5e748a5e2f15723085/raw/go | |
| # Usage : curl -fsSL https://tinyurl.com/yc46thx4 | bash | |
| # https://gist.github.com/eplord/c39ebb75fd8c318e207f7ece60d3cddb/raw/_utils | |
| source /dev/stdin <<<"$(curl -fsSL https://tinyurl.com/yck6pv5e)" | |
| # [[ -z "${GOROOT}" ]] && export GOROOT="/usr/lib/go" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo apt-get install -y \ | |
| apt-transport-https \ | |
| ca-certificates \ | |
| curl \ | |
| software-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
| sudo apt-key fingerprint 0EBFCD88 | |
| sudo add-apt-repository \ | |
| "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ |