heiko-barth.de

// Donnerstag

David Blaine: How I held my breath for 17 min

In this highly personal talk from TEDMED, magician and stuntman David Blaine describes what it took to hold his breath underwater for 17 minutes - a world record (only two minutes shorter than this entire talk!) - and what his often death-defying work means to him. Warning: do NOT try this at home.

foo/bar

// Mittwoch

How far is a second?

The moon may be 1.3 light-seconds away, but why on earth do we measure distances using time?

The Secret Life of Plankton

New videography techniques have opened up the oceans' microscopic ecosystem, revealing it to be both mesmerizingly beautiful and astoundingly complex. Marine biologist Tierney Thys has used footage from a pioneering project to create a film designed to ignite wonder and curiosity about this hidden world that underpins our own food chain.

foo/bar

// Dotfile: .bashrc

Ich habe mal ein paar Anregungen zur .bashrc Optimierung zusammen getragen:

# Color my prompt
export PS1='\[\e[0;36m\]\h\[\e[0;32m\]:\w\$\[\e[0m\] '
 
# $PS1 is your shell prompt
# \h the hostname up to the first '.'
# \[ specifying start of non-printing characters
# \e[ Start color scheme
# 0;36m Color pair to use (x;y). See also http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html
# \] specifying end of non-printing characters
# \w the current working directory, with $HOME abbreviated with a tilde 
# \e[0m Stop color scheme
 
# We need to surround all non-printing characters with special bash escape sequences, \[ and \].
# These sequences will tell bash that the enclosed characters don't take up any space on the line,
# which will allow word-wrapping to continue to work properly.
# Without them, you'll end up with a nice-looking prompt
# that will mess up the screen if you happen to type in a command that approaches the extreme right of the terminal. 
 
# Color my life
export LS_OPTIONS='--color=auto'
eval "`dircolors`"
 
export GREP_OPTIONS='--color=auto'
 
# Useful shortcuts
alias apt='aptitude'
alias cls='clear'
alias loop='while [ true ]; do'
alias mysqlctl='/etc/init.d/mysql'
 
# Lower process priority
alias low='nice -n 20 ionice -c3'
alias md5sum='low md5sum'
alias sha1sum='low sha1sum'
alias unrar='low unrar'
 
# Fix display bug when PuTTY is in UTF-8 translation mode
alias iptraf='[ $TERM == "screen" ] && iptraf || TERM=linux iptraf ' 
alias htop='[ $TERM == "xterm" ] && htop || TERM=screen-256color htop'
 
# Some more alias to avoid making mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
 
# Writes bash history immediately;  Useful for concurrent user log ins
# Applies only on interactive shells
shopt -s histappend
export PROMPT_COMMAND='history -a'
 
# Save execution time in history
export HISTTIMEFORMAT='%d.%m.%Y %H:%M:%S '
 
# This causes any lines matching the previous history entry not to be saved.
# Also commands beginning with a space character are not saved.
export HISTCONTROL='ignoreboth'
 
# This prevents writing history of this colon-separated list of patterns
export HISTIGNORE='truecrypt*'
 
# The  number  of commands to remember in the command history (default value is 500)
export HISTSIZE=500000
 
# Delay until given time
delay() {
	# $1 = hh:mm
	while [ $(date +%R) != $1 ]; do
		sleep 30
	done
}
Web 2.0



RSS   RSS abonieren

Github   Github
QR Code