Skip to content

Instantly share code, notes, and snippets.

@7oi
7oi / init.sh
Last active December 5, 2023 10:38
Dotfile init
#!/bin/bash
cd $HOME
# Create alias
function dots {
/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME $@
}
# Clone in the dotfiles
git clone --bare git@gitlab.com:7oi/dots.git $HOME/.dotfiles
git clone git@gitlab.com:7oi/tmux-themepack.git $HOME/.tmux-themepack

Keybase proof

I hereby claim:

  • I am 7oi on github.
  • I am 7oi (https://keybase.io/7oi) on keybase.
  • I have a public key whose fingerprint is CFF8 E1EC 2520 57DB 6AF2 0E3F 9458 ADA2 DC7C 0A4E

To claim this, I am signing this object:

@7oi
7oi / gitNew
Last active August 29, 2015 13:57
Script for making new git projects on GitHub
# Run within the folder meant for the project
# Next to git the thing
PROJ=$(basename $PWD)
echo $PROJ
git init
echo "Which files/folders to add (. for all)?"
ADD="what"
while [[ $ADD ]]; do
ls -A
read -p "Add: " ADD
@7oi
7oi / .bash_aliases
Created March 22, 2014 14:00
.bash_aliases
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[1;31m\]$(__git_ps1 " (%s)")\[\033[1;33m\]\$\[\033[00m\] '
# Regex for number
re='^[0-9]+$'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
@7oi
7oi / .bash_aliases
Last active December 26, 2015 23:28
My .bash_aliases
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
# Regex for number
re='^[0-9]+$'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'