krono redirection of everyday life, by Ivan Savcic

30Aug/100

Debian: online network interfaces reconfiguration with fallback to previous values

While inside screen:

/etc/init.d/networking stop; sleep 5; /etc/init.d/networking start; sleep 30; cp interfaces.old interfaces; /etc/init.d/networking stop; sleep 5; /etc/init.d/networking start

10Feb/100

Limiting apt-get download speed

create file /etc/apt/apt.conf.d/76download with content:

Acquire
{
Queue-mode "access";
http
{
Dl-Limit "25";
};
};

That limits apt-get to 25KB/s

10Dec/081

I’m just an old chunk of coal, but I’m gonna be a diamond some day

A good ol' from Ubuntu *and* Debian bugs:

Dimitrios Symeonidis wrote on 2008-10-14: (permalink)

this bug will soon celebrate it's 3rd birthday. it's marked as confirmed, high importance, and reported upstream (debian). are we going to do something about it, or are we just waiting for debian to resolve this?

(Emphasis added for extra lulz)

23Jan/080

SoX, yeah!

ls -1 *.wav | while read FILE; do sox "$FILE" -r 22050 "NOVO/$FILE" compand 0.001,0.15 -28,-inf,-24,-24 -0.3 0 0 resample -qs; done
22Nov/071

Remove comments and empty lines sed one-liner

sed -e 's/#.*//' -e 's/[ ^I]*$//' -e '/^$/ d'

...so I don't have to think of it again.

Filed under: Computers, GNU/Linux 1 Comment
10Nov/070

Deluge Torrent and Etch Backports

Simply wonderful.

I don't have to get it from testing and "break" my stable box with mixed trees!

21Oct/070

backports as default, stable as fallback

Add to /etc/apt/sources.list:
deb http://www.backports.org/debian etch-backports main contrib non-free

Add to /etc/apt/preferences:
Package: *
Pin: release a=etch-backports
Pin-Priority: 750
Package: *
Pin: release a=stable
Pin-Priority: 700

Add to /etc/apt/apt.conf.d/00Cache:
APT::Cache-Limit "33554432";
APT::Default-Release "etch-backports";

Do:

apt-get update
apt-get dist-upgrade

11Oct/070

htmldoc

htmldoc --size a4 --linkstyle plain --webpage --no-jpeg --tocheader ... --tocfooter ... --top 0 --bottom 20 --right 20 --left 20 -f book.pdf *.html

11Oct/071

Nice webserver uptime

Just checked:

imp@extweb:~> uptime
2:34pm up 674 days 3:03, 1 user, load average: 0.02, 0.11, 0.09

Filed under: Computers, GNU/Linux 1 Comment
20Jul/071

Apt pinning: installing unstable packages on stable Debian

Minimal sources.list configuration.

/etc/apt/sources.list:
deb http://security.debian.org/ etch/updates main contrib
deb-src http://security.debian.org/ etch/updates main contrib
deb http://ftp.de.debian.org/debian stable main non-free contrib
deb http://ftp.de.debian.org/debian testing main non-free contrib
deb http://ftp.de.debian.org/debian unstable main non-free contrib

When updgrading, stable versions of packages need to stay on stable. unstable versions are usually newer, so they overwrite stable versions if this is not properly handled with using Pin-Priority as stated below. If not explicitly requested, "apt-get install" installs stable version of a package.

/etc/apt/preferences:
Package: *
Pin: release a=stable
Pin-Priority: 700
Package: *
Pin: release a=testing
Pin-Priority: 650
Package: *
Pin: release a=unstable
Pin-Priority: 600

To install f.e. unstable version of a package with dependencies from unstable as well (preferred method, AFAIK), do the following:
apt-get install package -t unstable

To install the same package, but to resolve it's deps from stable:
apt-get install package/unstable