Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
##### installing homebrew
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)";
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv);
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv);
test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile;
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile;
# installing zsh and oh-my-zsh
brew install zsh
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{2c4de342-38b7-51cf-b940-2309a097f518}",
"profiles":
@tavallaie
tavallaie / multiple-deploy-keys-multiple-private-repos-github-ssh-config.md How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

How to configure multiple deploy keys for different private github repositories on the same computer without using ssh-agent

Let's say alice is a github.com user, with 2 or more private repositories repoN. For this example we'll work with just two repositories named repo1 and repo2

https://github.com/alice/repo1

https://github.com/alice/repo2

You need to be to pull from these repositories without entering a passwords probably on a server, or on multiple servers.

@tavallaie
tavallaie / QuakeTerminal.ahk
Created September 29, 2021 17:20 — forked from andrewgodwin/QuakeTerminal.ahk
AutoHotkey script for making Windows Terminal appear/disappear with a single keypress
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
F12::ToggleTerminal()
ShowAndPositionTerminal()
{
WinShow ahk_class CASCADIA_HOSTING_WINDOW_CLASS
@tavallaie
tavallaie / secure_erase.sh
Last active February 26, 2025 06:08
**Secure Data Erasure Script (Bash)** This Bash script securely erases data from a specified device with random data, ensuring irrecoverability. Use with caution.
#!/bin/bash
# Check if the script is run with superuser privileges
if [ "$EUID" -ne 0 ]; then
echo "Please run this script as root (sudo)."
exit 1
fi
# Prompt the user for the target devices
read -p "Enter the target devices (e.g., /dev/sdX /dev/sdY): " target_devices
@tavallaie
tavallaie / .env
Last active June 10, 2024 13:42
Migrates a repository from GitLab to GitHub, preserving history and branches.
GITHUB_ORGANIZATION=my_github_org
@tavallaie
tavallaie / Dockerfile
Last active August 22, 2024 21:11 — forked from usr-ein/Dockerfile
Optimal multistaged Dockerfile for poetry
# syntax=docker/dockerfile:1
# Keep this syntax directive! It's used to enable Docker BuildKit
################################
# PYTHON-BASE
# Sets up all our shared environment variables
################################
FROM python:3.12.5-slim-bookworm as python-base
# python
ip route show | grep -i default | awk '{ print $3}'
# --- Input Data ---
# Nominal GDP in USD
nominal_GDP_current = 640.59 * 1e9 # Convert billion USD to USD
# Population
population = 46.65 * 1e6 # Convert million to individuals
# Nominal GDP per Capita (Y)
Y = nominal_GDP_current / population