This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Instalation | |
| # git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm | |
| # git clone -b v2.3.0 https://github.com/catppuccin/tmux.git ~/.tmux/plugins/catppuccin | |
| set -g mouse on | |
| set -g default-terminal "tmux-256color" | |
| set -g base-index 1 # start windows numbering at 1 | |
| # List of plugins | |
| set -g @plugin 'tmux-plugins/tpm' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # setup | |
| sudo apt update -y && \ | |
| sudo apt upgrade -y | |
| # initial programs | |
| sudo apt install -y curl htop tree terminator git unzip | |
| # oh-my-zsh | |
| sudo apt install -y zsh && \ | |
| chsh -s $(which zsh) && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function fileToBase64(file, resolve, reject) { | |
| const fileReader = new FileReader() | |
| fileReader.onload = event => resolve(event.target.result.replace(/^.*,/, '')) | |
| fileReader.onerror = error => reject(error) | |
| fileReader.readAsDataURL(file) | |
| } | |
| // <input type="file" onChange={event => fileToBase64(event.target.files[0], console.log, console.error)} /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| memRamTotal=$(cat /proc/meminfo | grep MemTotal: | grep -oE '[0-9]+') # get memory size | |
| memRamTotal=$(($memRamTotal / 1000000)) # cast kb to gb | |
| # if no argument has been passed, then swapfile is equal memory ram size times 2 | |
| if [ -z "$1" ] | |
| then | |
| memSwap=$(($memRamTotal * 2)) | |
| else | |
| memSwap=$1 | |
| fi |