Skip to content

Instantly share code, notes, and snippets.

View JeyDi's full-sized avatar
🚀
To infinity... and beyond!

Andrea Guzzo JeyDi

🚀
To infinity... and beyond!
View GitHub Profile
@JeyDi
JeyDi / tmux_cheatsheet.md
Created January 15, 2024 08:57
Tmux cheatsheet

Tmux cheatsheet

I always forgot tmux command, here a simple list of commands and shortcut keys.

Another good cheatsheet online

Commands

# create a session
@JeyDi
JeyDi / load_dotenv.sh
Created January 15, 2024 08:48 — forked from mihow/load_dotenv.sh
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@JeyDi
JeyDi / .zshrc
Created February 27, 2023 22:36
ZSH standard config
#### My personal zsh minimal standard config ####
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Configure language
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
@JeyDi
JeyDi / bash-set-and-unset-env-from-file.sh
Created June 23, 2022 15:15 — forked from apolopena/bash-set-and-unset-env-from-file.sh
Set and unset environment variables from an .env file
# set environment vars from an .env file
export $(grep -v '^#' .myenvfile | xargs)
# unset environment vars from an .env file
unset $(grep -v '^#' .myenvfile | awk 'BEGIN { FS = "=" } ; { print $1 }')
@JeyDi
JeyDi / 01-generate-ed25519-ssh-key.sh
Created March 24, 2022 17:37 — forked from grenade/01-generate-ed25519-ssh-key.sh
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# 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
eval "$(ssh-agent -s)"
@JeyDi
JeyDi / git-ssh-access-faq.md
Last active July 12, 2022 15:30 — forked from mcandre/git-ssh-access-faq.md
Git/SSH Access Frequently Asked Questions

Git/SSH Access FAQ

If you see Access denied, or other error messages when trying to access a git repository or SSH server, here are some steps you can take to resolve the problem.

Enable verbose mode

When in doubt, run ssh -vvv <other options...> to enable more verbose logging.

How do I request git repo / ssh permissions?

@JeyDi
JeyDi / .mytheme.omp.json
Last active March 20, 2021 18:43
OhMyPoshConfig
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "session",
"style": "plain",
@JeyDi
JeyDi / NumpyCheatsheet.py
Last active December 6, 2020 18:27
Numpy cheatsheet and useful functions and tips
## Numpy Cheatsheet and useful operations
## Reference:
# https://gist.github.com/flyudvik/ffc5f949d9da4aec7bc3ed96cf0038d6
# https://towardsdatascience.com/numpy-cheat-sheet-4e3858d0ff0e
#Import numpy
import numpy as np
#####################
### ARRAY METHODS ###
@JeyDi
JeyDi / PandasSQLQuery.py
Last active March 4, 2022 07:08
From SQL to Python Pandas
# From SQL to Python Pandas Cheatsheet
# many thanks to: https://medium.com/jbennetcodes/how-to-rewrite-your-sql-queries-in-pandas-and-more-149d341fc53e
# Using airports data example: https://ourairports.com/data/
import pandas as pd
# Reset Pandas Index
df.reset_index(drop=True, inplace=True)
# Simply add a columns with an easy calculation