This file contains 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
#!/bin/bash | |
# Small script that will use htpasswd to hash a password | |
# This is useful for Traefik, especially if you don't want to install apache2-utils on your system | |
# It can be run using docker: | |
# docker container run -ti --rm -v $PWD:/data -w /data ubuntu:bionic bash -c "bash htpasswd.sh" | |
# hashed password will be stored in the file log.timestamp to ensure unique name | |
timestamp=$(date +%s) |
This file contains 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
#!/bin/bash | |
# install x2go with xfce | |
# based on https://fabianlee.org/2019/02/03/ubuntu-x2go-on-ubuntu-bionic-for-remote-desktop-access/ | |
# Should be able to run this script as your regular user if they are in the sudoers list | |
# ensure user is not root | |
if [[ $EUID -eq 0 ]]; then | |
echo "This script should not be run as root, but $USER should have sudo privileges" | |
exit 1 | |
fi |
This file contains 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
# some parts borrowed from | |
# http://leahneukirchen.org/dotfiles/.zshrc | |
# https://leahneukirchen.org/blog/archive/2012/02/10-new-zsh-tricks-you-may-not-know.html | |
# these options allow for neat directory history | |
# cd -<TAB> | |
setopt AUTO_PUSHD | |
setopt PUSHD_IGNORE_DUPS | |
setopt PUSHD_MINUS |
This file contains 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
# theme for oh-my-zsh | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch | |
git_custom_status() { | |
local cb=$(current_branch) | |
if [ -n "$cb" ]; then |