commit 347f373604011b9ba08317d89a4941e99c27e6d6 Author: Victor Westerlund Date: Fri Nov 22 03:26:04 2024 +0100 initial commit diff --git a/.bash_aliases b/.bash_aliases new file mode 100644 index 0000000..91f9eec --- /dev/null +++ b/.bash_aliases @@ -0,0 +1,34 @@ +# Make dir and cd into it +mkcdir () { + mkdir -p -- "$1" && + cd -P -- "$1" +} + +# ls -la +alias l="ls -lh" +alias ll="ls -lah" +# cd + +cdl () { + cd -P -- "$1" && + ll +} + +cdll () { + cp -P -- "$1" && + lll +} + +# Create standard git WIP commit with timestamps +alias gitwip="git commit -m \"wip: $(date +%Y-%m-%dT%H:%M:%S%z) ($(date +%s))\"" + +# Remove dropped upstream git branches from remote +alias gitclear="git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D" + +# Generate random 16byte HEX +alias rng16="head -c 16 /dev/random | xxd -p" + +# Kill VSCode processes +alias killvscode="ps uxa | grep .vscode-server | awk '{print $2}' | xargs kill -9" + +# Change PHP CLI binary +alias chphp="sudo update-alternatives --config php" diff --git a/.config/git/.gitconfig b/.config/git/.gitconfig new file mode 100644 index 0000000..fd77844 --- /dev/null +++ b/.config/git/.gitconfig @@ -0,0 +1,13 @@ +[user] + email = victor@vlw.se + name = Victor Westerlund +[core] + fileMode = false + excludesfile = ${HOME}/.gitignore +[filter "lfs"] + process = git-lfs filter-process + required = true + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f +[lfs] + contenttype = 0 diff --git a/.config/git/.gitignore b/.config/git/.gitignore new file mode 100644 index 0000000..3982f97 --- /dev/null +++ b/.config/git/.gitignore @@ -0,0 +1,33 @@ +# OS generated files # +###################### +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +Icon? +ehthumbs.db +Thumbs.db +.directory + +# Tool specific files # +####################### +# vim +*~ +*.swp +*.swo +# sublime text & textmate +*.sublime-* +*.stTheme.cache +*.tmlanguage.cache +*.tmPreferences.cache +# Eclipse +.settings/* +# JetBrains, aka PHPStorm, IntelliJ IDEA +.idea/* +# NetBeans +nbproject/* +# Visual Studio Code +.vscode +# Sass preprocessor +.sass-cache/ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1c496a1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +** +!.config/ + +# Include configs +!.nanorc +!.tmux.conf +!.config/git/ +!.config/git/** +!.bash_aliases + +# Include this file +!.gitignore diff --git a/.nanorc b/.nanorc new file mode 100644 index 0000000..8496fdb --- /dev/null +++ b/.nanorc @@ -0,0 +1 @@ +bind ^Z suspend main diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..249dc29 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,20 @@ +# Enable PS1 colors +set -g default-terminal "screen-256color" + +# Resize to smallest attached client +#set -g window-size smallest + +# Enable mouse support +set -g mouse on + +# Set the control character to Ctrl+Spacebar (instead of Ctrl+B) +set -g prefix C-space +set -g prefix F1 +#unbind-key C-b +bind-key C-space send-prefix +bind-key F1 send-prefix + +# Set new panes to open in current directory +bind c new-window -c "#{pane_current_path}" +bind '"' split-window -c "#{pane_current_path}" +bind % split-window -h -c "#{pane_current_path}"