2014/12/16
Alt-tab in KDE4
System Settings -> Desktop -> Desktop Effects -> All Effects -> Flip Switch (tick and apply)
2014/12/09
Vim Tabular plugin
0. Links:
http://vimcasts.org/episodes/aligning-text-with-tabular-vim/
https://github.com/godlygeek/tabular
https://github.com/tpope/vim-pathogen
1. Install pathogen:
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
2. Configure pathogen:
vi .vimrc:
execute pathogen#infect()
Now any plugins you wish to install can be extracted to a subdirectory under ~/.vim/bundle, and they will be added to the 'runtimepath'. Observe:
cd ~/.vim/bundle && \
git clone git://github.com/tpope/vim-sensible.git
3. Install tabular:
cd ~/.vim/bundle
git clone git://github.com/godlygeek/tabular.git
4. Configure help:
vim
:Helptags
5. Read help:
vim
:help tabular
6. Use:
<select lines>
:Tab /=
:Tab /\.
http://vimcasts.org/episodes/aligning-text-with-tabular-vim/
https://github.com/godlygeek/tabular
https://github.com/tpope/vim-pathogen
1. Install pathogen:
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
2. Configure pathogen:
vi .vimrc:
execute pathogen#infect()
Now any plugins you wish to install can be extracted to a subdirectory under ~/.vim/bundle, and they will be added to the 'runtimepath'. Observe:
cd ~/.vim/bundle && \
git clone git://github.com/tpope/vim-sensible.git
3. Install tabular:
cd ~/.vim/bundle
git clone git://github.com/godlygeek/tabular.git
4. Configure help:
vim
:Helptags
5. Read help:
vim
:help tabular
6. Use:
<select lines>
:Tab /=
:Tab /\.
2014/12/04
Keyboard keys
Extra keyboard keys
Console:
# showkey --keycodes
GUI:
$ xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
Console:
# showkey --keycodes
GUI:
$ xev | grep -A2 --line-buffered '^KeyRelease' | sed -n '/keycode /s/^.*keycode \([0-9]*\).* (.*, \(.*\)).*$/\1 \2/p'
2014/12/01
2014/11/19
How many hours ago was the file changed?
FILE="/path/to/file"
CURRENT_DATE=$(date +%s)
PREVIOUS_DATE=$(date -d "$(ls -ld $FILE | awk '{print $6,$7,$8}')" "+%s")
DELTA=$(( CURRENT_DATE - PREVIOUS_DATE ))
DELTA_HOURS=$(echo "scale=2; $DELTA / 3600" | bc)
echo $DELTA_HOURS hours ago
CURRENT_DATE=$(date +%s)
PREVIOUS_DATE=$(date -d "$(ls -ld $FILE | awk '{print $6,$7,$8}')" "+%s")
DELTA=$(( CURRENT_DATE - PREVIOUS_DATE ))
DELTA_HOURS=$(echo "scale=2; $DELTA / 3600" | bc)
echo $DELTA_HOURS hours ago
2014/11/07
Subscribe to:
Posts (Atom)