About this page

This page is dedicated to commands I use frequently but forget often. An entry qualifies to be on this wiki if upon google search, I see several links are purple. The date reflects the date of the latest update

Permission Denied public key

Generate SSH Key

cd ~/.ssh && ssh-keygen

Copy to clipboard

cat id_rsa.pub

Add this key to your github account

Authenticate git

ssh -vT git@github.com

Fixing permission denied public key on github actions.

from

ssh into the server

ssh username@server_ip

step into ssh folder

cd .ssh

Generate ssh

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Name it something like gh-actions keys or something so you remember

Adding the Public Key to authorized_keys

cat gh-actions.pub >> authorized_keys

Add the private key to your repository’s secrets

cat gh-actions

Go to settings (under repo) go to secrets and variables. create new secret, name your secret, and add the value.

Adding the Private key to a Github Actions Workflow

# Steps represent a sequence of tasks that will be executed as part of the job

# copy ssh key

steps:
   - name: Install SSH Key
      uses: shimataro/ssh-key-action@v2
      with:
         key: ${{ secrets.SSH_PRIVATEKEY }}
         known_hosts: 'placeholder'
   # add known hosts from server
   - name : Add Known Hosts
      run: ssh-keyscan -H ${{ secrets.HOST }} >> ~/.ssh/known_hosts

Adding a correct known_hosts value

steps:
   ...
   ...
   # add known hosts from server
   - name : Add Known Hosts
      run: ssh-keyscan -H ${{ secrets.HOST }} >> ~/.ssh/known_hosts

Downloading files with curl

curl http://some.url --output some.file

Unzipping a file with bash

unzip {file.zip}

Open the shortcut window on gmail

click "?"

Fixing unable_to_get_issuer_cert_locally Error in Node JS

Find your cert.pem file.

If you’re using homebrew with open ssl >3, it should be in the /opt/homebrew/etc/ca-certificates folder Add an environment constant with the path to the file export NODE_EXTRA_CA_CERTS=path/to/my-certs.pem or in Windows set NODE_EXTRA_CA_CERTS=C:\\path\\to\\certificate.pem

Create and initialize Python virtual environments.

Create virtual environment python3.8 -m venv env Initialize virtual environment source env/bin/activate

Git log pretty with hash, date, author, and commit message

set alias: git config --global alias.logline "log --pretty=\"%C(Yellow)%h %C(reset)%ad (%C(Green)%cr%C(reset))%x09 %C(Cyan)%an: %C(reset)%s\" --date=short" invoke: git logline invoke for last n lines: git logline -n

Converting images from one format (.jpg, .heic) to another (.png)

sips -s format [format] -s formatOptions best [name].jpg --out [name].[format]