Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Henry Schober elhenro

🎯
Focusing
Block or report user

Report or block elhenro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@elhenro
elhenro / pv.sh
Last active May 24, 2019
lf preview script
View pv.sh
#!/bin/sh
case "$1" in
*.jpg) feh "$1";;
*.tar*) tar tf "$1";;
*.zip) unzip -l "$1";;
*.rar) unrar l "$1";;
*.7z) 7z l "$1";;
*.pdf) pdftotext "$1" -;;
*) highlight -O ansi "$1" || cat "$1";;
View lfrc
set previewer ~/.config/lf/pv.sh
cmd trash ${{
mkdir -p ~/trash
if [ -z "$fs" ]; then
mv "$f" ~/trash
else
IFS="`printf '\n\t'`"; mv $fs ~/trash
fi
}}
@elhenro
elhenro / hexToTerminalColor.sh
Created May 20, 2019
convert hex color codes to terminal color codes
View hexToTerminalColor.sh
#!/usr/bin/bash
for i in {0..255} ; do
printf "\x1b[38;5;${i}mcolour${i} "
done
View backup bash script
#!/bin/bash
rootcheck () {
if [ $(id -u) != "0" ]
then
echo "warning: auto appending sudo.."
sudo "$0" "$@"
exit $?
fi
}
rootcheck
View i3.status
general {
colors = true
interval = 1
color_good = "#2AA198"
color_bad = "#586E75"
color_degraded = "#DC322F"
}
order += "volume master"
order += "cpu_usage"
@elhenro
elhenro / zsh-spaceship-hide-stuff
Created May 11, 2019
zsh-spaceship-hide-stuff
View zsh-spaceship-hide-stuff
SPACESHIP_GIT_SHOW=false
SPACESHIP_HG_SHOW=false
SPACESHIP_HG_BRANCH_SHOW=false
SPACESHIP_HG_STATUS_SHOW=false
SPACESHIP_PACKAGE_SHOW=false
SPACESHIP_NODE_SHOW=false
SPACESHIP_RUBY_SHOW=false
SPACESHIP_ELM_SHOW=false
SPACESHIP_ELIXIR_SHOW=false
SPACESHIP_XCODE_SHOW_LOCAL=false
@elhenro
elhenro / bashrc
Created May 9, 2019
bash rc profile
View bashrc
# ~/.bashrc
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
PS1='[\u@\h \W]\$ '
# go
export PATH="$PATH:$HOME/go/bin"
# nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
@elhenro
elhenro / .vimrc
Last active Aug 16, 2019
elhenro vimrc
View .vimrc
syntax on
set encoding=UTF-8
set expandtab
set shiftwidth=2
set tabstop=2
set mouse=a
set number
set autoread
set diffopt+=iwhite
set hidden
View pv.sh
#!/bin/sh
case "$1" in
*.tar*) tar tf "$1";;
*.zip) unzip -l "$1";;
*.rar) unrar l "$1";;
*.7z) 7z l "$1";;
*.pdf) pdftotext "$1" -;;
*) highlight -O ansi "$1" || cat "$1";;
esac
View lfrc
set previewer ~/.config/lf/pv.sh
You can’t perform that action at this time.