Browsed by
Category: Linux

[Linux] Random password generator

[Linux] Random password generator

Here is a script for generating random alphanumeric passwords: #!/bin/bash # passwords.sh if [ $# != 2 ]; then echo "usage: $0 <length of passwords> <number of passwords> " exit 1 fi tr -cd ‘[:graph:]’ < /dev/urandom | fold -w $1 | head -$2#!/bin/bash # passwords.sh if [ $# != 2 ]; then echo "usage: $0 <length of passwords> <number of passwords> " exit 1 fi tr -cd ‘[:graph:]’ < /dev/urandom | fold -w $1 | head -$2

[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