Wednesday, April 30, 2008

Epoch/Unix time to normal time

#!/usr/bin/perl

my $time = $ARGV[0];
my @months = ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
my ($sec, $min, $hour, $day,$month,$year) = (localtime($time))[0,1,2,3,4,5,6];

print "Unix time ".$time." --> ".$months[$month]." ".$day.", ".($year+1900)." ".$hour.":".$min.":".$sec."\n";


Tuesday, April 29, 2008

Changing wine font dpi

HKEY_CURRENT_CONFIG\Software\Fonts\LogPixels

Prothom-alo on Ubuntu/Debian

apt-get install language-support-fonts-bn ttf-bengali-fonts ttf-indic-fonts-core

now, install the Prothom-alo fonts:
  • http://www.prothom-alo.com/fonts/download/bngsalpn.ttf
  • http://www.prothom-alo.com/fonts/download/prothoma.ttf
Restart firefox && enjoy ;)


My SuPeR-DuPeR vim config ;)


runtime! debian.vim
syntax on

if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal g'\"" | endif
endif

if has("autocmd")
filetype indent on
endif

set showcmd
set showmatch
set ignorecase
set smartcase
set incsearch
set autowrite
set hidden

if filereadable("/etc/vim/vimrc.local")
source /etc/vim/vimrc.local
endif


set number
set hlsearch
colorscheme slate



My konqueror tweaks

The following tweaks will
  1. Remove the "New Tab" & "Close Tab" buttons from konqueror toolbar.
  2. Hovering on favicon will change to "Close Tab" button (how kool is that :P !!)
  • kwriteconfig --file konquerorrc --group FMSettings --key AddTabButton --type bool false
  • kwriteconfig --file konquerorrc --group FMSettings --key CloseTabButton --type bool false
  • kwriteconfig --file konquerorrc --group FMSettings --key PermanentCloseButton --type bool false
  • kwriteconfig --file konquerorrc --group FMSettings --key HoverCloseButton --type bool true