Skip to content

Instantly share code, notes, and snippets.

View tkalve's full-sized avatar
👨‍💻
full-snack developer

Thomas Kalve tkalve

👨‍💻
full-snack developer
View GitHub Profile
@tkalve
tkalve / hyper.js
Created May 28, 2019 11:09
My hyper.js config file
Ok
@tkalve
tkalve / test.html
Created September 15, 2017 08:07
Ludvig test
<!DOCTYPE html>
<html lang="no">
<head>
<meta charset="utf-8" />
<title>Luddipudde</title>
</head>
<body>
<span id="LatestNews" class="semi-bold">Loading latest news...</span>
@tkalve
tkalve / color_my_prompt.sh
Created January 28, 2016 11:51
Colored bash prompt
function color_my_prompt {
local __user_and_host="\[$(tput bold)\]\[\033[38;5;198m\]\u\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;255m\] at \[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;214m\]\h\[$(tput sgr0)\]"
local __cur_location="\[\033[38;5;255m\]in \[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;154m\]\w\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\]"
local __git_branch_color="\[$(tput sgr0)\]\[\033[38;5;247m\]"
local __git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`'
local __prompt_tail="\n\[$(tput sgr0)\]\[\033[38;5;255m\]\\$\[$(tput sgr0)\]"
local __last_color="\[\033[00m\]"
export PS1="$__user_and_host $__cur_location $__git_branch_color$__git_branch$__prompt_tail$__last_color "
}
color_my_prompt