Category Archives: bike

raspberry pi for n00bs

this article will be updated often
==================================

* dowloaded raspbian, dd’ed it to a 4Gb SD card.
dd if=2012-10-28-wheezy-raspbian.img of=/dev/sdb

* extra software installed
vim
mplayer

* files that I modifed

/boot/config.txt
hdmi_drive=2

overscan_left=32
#overscan_right=16
overscan_top=16
overscan_bottom=16

list installed packages by size Debian/Ubuntu

Need to remove storage eager installed packages:

dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail

and then you can “scroll” through the list:

dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n20 | head
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n | tail -n30 | head


Source:here

sed: replacing in a range of lines

this can be useful to update/modify configuration files.


fvaras@fvaras:/tmp$ sed -i '1,2s/a/X/g' /tmp/blob
fvaras@fvaras:/tmp$ sed -i '3,4s/s/X/g' /tmp/blob
fvaras@fvaras:/tmp$ sed -i '5,6s/r/X/g' /tmp/blob
fvaras@fvaras:/tmp$ cat -n blob
1 Xsdf
2 Xsdf
3 aXdf
4 aXdf
5 asdf
6 asdf
7 asdf
8 asdf
9 asdf
10 asdf
11 asdf

mp3 on ben nanonote (openWRT)

*This posts differs slightly from the source
** I’ve already mounted the /data/ partition

cd /data
mkdir install_temp
cd install_temp/
wget http://wejp.k.vu/files/gmu-0.7.1-DINGOO.zip
unzip gmu-0.7.1-DINGOO.zip
cp gmu-0.7.1-DINGOO/decoders/mpg123.so /usr/share/gmu/decoders
cp gmu-0.7.1-DINGOO/libs.dingoo/libmpg123.so.0 /usr/lib


Enjoy!

source:here