start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/env bash | |
DIRECTORIES="/etc /home /usr/local /opt" | |
EXCLUDES="/home/chris/.local/share/Cryptomator" | |
USER=chris | |
MOUNT_LABEL="BackupDisk" | |
ALLOWED_MACHINES="CENTAURI" | |
RSYNC_PARAMETERS="-avPEHh --delete --stats --dry-run" | |
# Ensure rsync is available |
## Basic requirements for python development | |
sudo apt-get install build-essential zlib1g-dev libffi-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev liblzma-dev | |
## Tkinter support | |
sudo apt-get install tk-dev | |
## PyAudio support | |
sudo apt-get install portaudio19-dev | |
## ffmpeg support |
#!/usr/bin/env sh | |
env | grep "REACT_APP_" | while IFS= read -r line; do | |
var=${line%%=*} | |
val=$(printf '%s\n' "${line#*=}" | sed -e 's/[\/&]/\\&/g') | |
find . -type f -regex '.*\.\(html\|js\|js\.map\|css\|css\.map\|json\|svg\)' \ | |
-exec sed -i "s/{{$var}}/$val/g" {} + | |
done | |
command -v pm2 > /dev/null && status="$?" || status="$?" |
#!/usr/bin/env bash | |
$($(cat /usr/local/share/applications/jetbrains-idea.desktop ~/.local/share/applications/jetbrains-idea.desktop 2>/dev/null | grep -m1 -Eo '^Exec="(.*)"' | cut -d'"' -f2) "$@") |
# https://stackoverflow.com/questions/6543519/undoing-accidental-git-stash-pop | |
# https://stackoverflow.com/questions/89332/how-to-recover-a-dropped-stash-in-git | |
accepted | |
If you have only just popped it and the terminal is still open, you will still have the hash value printed by git stash pop on screen (thanks, Dolda). | |
Otherwise, you can find it using this for Linux and Unix: | |
git fsck --no-reflog | awk '/dangling commit/ {print $3}' | |
and for Windows: |
# Install ARCH Linux with encrypted file-system and UEFI | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Copy to a usb-drive | |
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# Set german keymap |
#!/usr/bin/env bash | |
# ################################################## | |
# My Generic BASH script template | |
# | |
version="1.0.0" # Sets version variable | |
# | |
scriptTemplateVersion="1.3.0" # Version of scriptTemplate.sh that this script is based on | |
# v.1.1.0 - Added 'debug' option | |
# v.1.1.1 - Moved all shared variables to Utils |
sudo chmod go-w ~/ && \ | |
sudo chmod 600 ~/.ssh/* && \ | |
sudo chmod 644 ~/.ssh/*.pub && \ | |
sudo chmod -f 644 ~/.ssh/authorized_keys && \ | |
sudo chmod 644 ~/.ssh/known_hosts && \ | |
sudo chmod 700 ~/.ssh && \ | |
sudo chown $(id -un):$(id -gn) ~/.ssh |
#!/bin/bash | |
# ------------------------------------------------------------------ | |
# [Christian Ego] luksmount | |
# Mounts an encrypted LUKS container | |
# ------------------------------------------------------------------ | |
HELP="\n | |
Usage:\n | |
\t$(basename $0) [FILE] [MOUNTPOINT] [FILESYSTEM]\n | |
\n |