Bitcoin donations are welcome:14snQXeLcnJtWUduKZ6rC2MHdPYrYar1Tw

Thursday, March 14, 2013

Unbalanced audio when tuning with amixer in Linux

I've recently experienced that my audio balance gets uneven when tuning it up and down by using the amixer command (My dedicated vol+/vol- buttons triggers the amixer command). My solution to this problem is restarting pulseaudio running in the background. I just kill it (killall -9 pulseaudio), and restart whatever musicplayer I'm currently using, and it's working fine again.

To balanse the audio you can use alsamixer from the cmd, and press b to balance the audio.

Friday, March 8, 2013

How to get the cheapest airline tickets

Here's the most important advice to follow if you want to get the cheapest airline tickets available. This is advice that I've collected over time. In my very own empiric and highly unofficial "study" it seems to be golden!

1.) Only order tickets on the following two days:
A) Tuesdays, or next best...
B) Saturdays

It's all about supply and demand. Most people order tickets the rest of the week, causing the dynamic ticket pricing systems to increase the prices. Try sticking to Tuesday is my very own top advice!

2.) Cheapest days to ravel
Tuesday or Wednesday is absolutely the best in my experience. Fewer people travel these days. Business travelers seems to push the prices up since they are traveling a lot on Sundays, Mondays and Fridays.

3.) How early before departure should you order your ticket?
This has actually been scientifically studied. Eight weeks seems to be your best bet.

4.) Check one-way tickets.
It's often cheaper to order one-way tickets each way.

5.) Combine different airlines
Try building your own route with different airline companies.

Add / Remove / Replace dm crypt passwords (debian)


General information
You can have multiple passwords to your dm crypted drive. The passwords are stored in slots. If you haven't added any passwords since you set up your system, your password is (most likely) stored in slot 0.

If you want to replace your current password, you can add a new password, taking slot 1. After doing this, you can delete slot 0.

How to..
1.) First you have to find out which device is encrypted


system:/home/user# cat /etc/crypttab
 # sda3_crypt /dev/sda3 none luks
sda3_crypt UUID=aa781a6a-7477-44a2-97c2-6c55598f4c5c none luks
system:/home/user#

As you might understand your encrypted drive is /dev/sda3.

2.) Next it's plain forward. Just remember to make sure you are using the same keymap as your are using during the initrd (bootup) process. Otherwise you might end up with a password you don't know how to type with your current keymap in initrd. Check my post about keymaps if you want to know how to change keymaps before entering new passwords.

You can add passwords by typing:

system:/home/user# cryptsetup luksAddKey /dev/sda3
Enter any LUKS passphrase:
key slot 0 unlocked.
Enter new passphrase for key slot:

You can delete slots (passwords) by typing (example will delete slot 0):

system:/home/user# cryptsetup luksDelKey /dev/sda3 0

Change keymap/keyboard layout of linux terminal

To temporarily change keymap (keyboard language layout) in your console you can use a command called loadkeys.

Only con is that you can't load keymaps like this in xterm or other in-GUI terminals. (Not that I know of so far). If someone have a solution for this as well, please let us know :-)

How to:
load a terminal, i.e. ctrl+alt+f5 (terminal 5), log in, enter superuser mode "su", and simply




system:/home/user# loadkeys no
Loading /usr/share/keymaps/i386/qwerty/no.kmap.gz
system:/home/user#
..or
system:/home/user# loadkeys us
Loading /usr/share/keymaps/i386/qwerty/us.kmap.gz
system:/home/user#

...the keymaps that I have available is:
system:/home/user# ls /usr/share/keymaps/i386/qwerty/
ar.kmap.gz              it2.kmap.gz                ru2.kmap.gz
bg-cp1251.kmap.gz       it-ibm.kmap.gz             ru3.kmap.gz
bg.kmap.gz              it.kmap.gz                 ru4.kmap.gz
br-abnt2.kmap.gz        jp106.kmap.gz              ru-cp1251.kmap.gz
br-latin1.kmap.gz       kg.kmap.gz                 ru.kmap.gz
by.kmap.gz              kk.kmap.gz                 ru-ms.kmap.gz
ca-multi.kmap.gz        la-latin1.kmap.gz          ru_win.kmap.gz
cf.kmap.gz              lisp-us.kmap.gz            ru-yawerty.kmap.gz
cz-lat2.kmap.gz         lk201-us.kmap.gz           se-fi-ir209.kmap.gz
cz-lat2-prog.kmap.gz    lt.kmap.gz                 se-fi-lat6.kmap.gz
cz-us-qwerty.kmap.gz    lt.l4.kmap.gz              se-ir209.kmap.gz
defkeymap.kmap.gz       lv-latin4.kmap.gz          se-lat6.kmap.gz
defkeymap_V1.0.kmap.gz  lv-latin7.kmap.gz          se-latin1.kmap.gz
dk.kmap.gz              mac-usb-dk-latin1.kmap.gz  sk-prog.kmap.gz
dk-latin1.kmap.gz       mac-usb-es.kmap.gz         sk-prog-qwerty.kmap.gz
emacs2.kmap.gz          mac-usb-euro.kmap.gz       sk-qwerty.kmap.gz
emacs.kmap.gz           mac-usb-fi-latin1.kmap.gz  sr-cy.kmap.gz
es-cp850.kmap.gz        mac-usb-se.kmap.gz         th-tis.kmap.gz
es.kmap.gz              mac-usb-uk.kmap.gz         tralt.kmap.gz
et.kmap.gz              mac-usb-us.kmap.gz         trq.kmap.gz
et-nodeadkeys.kmap.gz   mk.kmap.gz                 tr_q-latin5.kmap.gz
fa.kmap.gz              nl.kmap.gz                 trqu.kmap.gz
fi.kmap.gz              no.kmap.gz                 ua.kmap.gz
fi-latin1.kmap.gz       no-latin1.kmap.gz          ua-utf.kmap.gz
gr.kmap.gz              no-standard.kmap.gz        ua-utf-ws.kmap.gz
gr-pc.kmap.gz           pc110.kmap.gz              uaw.kmap.gz
gr-utf8.kmap.gz         pl1.kmap.gz                ua-ws.kmap.gz
hebrew.kmap.gz          pl.kmap.gz                 uaw_uni.kmap.gz
hu101.kmap.gz           pt-latin1.kmap.gz          uk.kmap.gz
il-heb.kmap.gz          pt-old.kmap.gz             us-intl.iso01.kmap.gz
il.kmap.gz              ro-academic.kmap.gz        us-intl.iso15.kmap.gz
il-phonetic.kmap.gz     ro-comma.kmap.gz           us.kmap.gz
is-latin1.kmap.gz       ro.kmap.gz                 us-latin1.kmap.gz
is-latin1-us.kmap.gz    ru1.kmap.gz
system:/home/user#