Skip to content

Instantly share code, notes, and snippets.

@frntn
frntn / ohmyzsh
Created May 7, 2014 08:11
What happen when installing oh-my-zsh configuration without having zsh installed ( => should add a check if shell is installed )
root@precise32:~# curl -L http://install.ohmyz.sh | sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 104 100 104 0 0 159 0 --:--:-- --:--:-- --:--:-- 650
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
100 1779 100 1779 0 0 1119 0 0:00:01 0:00:01 --:--:-- 42357
Cloning Oh My Zsh...
Cloning into '/root/.oh-my-zsh'...
remote: Reusing existing pack: 10071, done.
Receiving objects: 100% (10071/10071), 2.04 MiB | 500 KiB/s, done.
@frntn
frntn / pipe_stderr_only.sh
Created May 6, 2014 17:23
Proof of Concept : Pipe (and color output for proof) of stderr only
#!/bin/bash
function outerr {
echo "this is on standard ouput (blank color)"
echo "but this one is on error ouput (red color)" >&2
}
exec 3>&1
outerr 2>&1 >&3 | sed -e 's/^/'$(printf "\033[1;31m")'/' -e 's/$/'$(printf "\033[39m")'/'
exec 3>&-
@frntn
frntn / .screenrc
Created October 8, 2012 08:53
A simple screenrc with tabs & login shell
hardstatus alwayslastline
hardstatus string '%{Yk}%-w%{.Yk}%n %t%{-}%+w %=%{.w} %{kY}%C'
shell -$SHELL
deflogin on
backtick 1 5 5 uptime
bind f eval "caption splitonly" "hardstatus ignore"
bind F eval "caption always" "hardstatus alwayslastline"
#defscrollback 12000
#bind ^j focus down