Browsed by
Tag: Linux

[Bash,Linux] Very fast disk shredding/data erasure script

[Bash,Linux] Very fast disk shredding/data erasure script

Before I have setted up my encrypted partitions I had to fill them with random sequention of data. I’ve noticed that dd if=/dev/urandom of=DEVICE is very slow. It has 3-4 MB/second on my computer. I wanted to make it faster. Here is my solution: 1. Create in tmpfs located in RAM memory large file (about 100 MB) made of pseudo-random sequence (/dev/urandom). 2. Write this file from memory sequentially to the disk. Speed of this approach is even 34 MB/s…

Read More Read More

[Ubuntu] Nice Amarok-like music Player

[Ubuntu] Nice Amarok-like music Player

I’ve used Amarok for a long time. Unfortunately, interface of Amarok 2 has  been remarkably changed.  I like “old” Amarok’s interface so I’ve found Exaile – Amarok like music player for Gnome written in Python.

[Linux] How to execute SQL query on Firefox history

[Linux] How to execute SQL query on Firefox history

1. If you don’t know anything about SQLite, please read: http://en.wikipedia.org/wiki/SQLite 2. Install sqlitebrowser: sudo apt-get install sqlitebrowsersudo apt-get install sqlitebrowser 3. Run sqlitebrowser 4. Open file: /home/your username/.mozilla/firefox/your profile/places.sqlite It’s a SQLite database where firefox stores information about history. 5. Execute following command: SELECT url FROM moz_places WHERE url LIKE "%wojtekrj.net%"SELECT url FROM moz_places WHERE url like "%wojtekrj.net%" 6. You should have list of all vistied by you pages from my blog.

[Linux] How to check if program has memory leaks

[Linux] How to check if program has memory leaks

You can check your program using command: valgrind your_programvalgrind your_program Example of usage: We have following C++ program (tst.cpp): int main() { int * tab = new int[1000000]; return 0; }int main() { int * tab = new int[1000000]; return 0; } Obviously it generates memory leak. We compile it to tst file and execute: valgrind tstvalgrind tst