Skip to content

Instantly share code, notes, and snippets.

View alfeyo's full-sized avatar
🫡
An African designer and developer in one.

Alfeyo alfeyo

🫡
An African designer and developer in one.
View GitHub Profile

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:\Users\Me\bin\script. But different operating systems have different ways to add a new directory to it:

Windows

  1. The first step depends which version of Windows you're using:
  • If you're using Windows 8 or 10, press the Windows key, then search for and
@malkam03
malkam03 / git-add-commit.sh
Last active August 9, 2023 10:16
Bash script to do a git add and a git commit with message in one line and with multiple files.
#!/bin/bash
echo "Adding and commiting files"
# loop for all files until reach to a -m
while [ "$1" != "" ] && [ "$1" != "-m" ]; do
#Print the file name that is being added
echo "Adding to staging area $1"
#Adds the file
git add "$1"
#Go to the next parameter
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active November 9, 2024 20:40
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <[email protected]>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network