A oneliner with Perl does the trick:
$ perl -le 'print crypt("password", "salt")'
Your htpasswd-file should then look like so:
UserName:EncryptedPassword:YourComment
August 31, 2009
A oneliner with Perl does the trick:
$ perl -le 'print crypt("password", "salt")'
Your htpasswd-file should then look like so:
UserName:EncryptedPassword:YourComment
August 28, 2009
Ever wondered how you can password protect a folder and the underlying content with nginx the same way Apache does? Pretty simple.
First create a htpass-file like so:
# htpasswd -b htpass NewUser NewPasswordEdit your site’s configuration file by adding the following lines of code inside the server-block:
location ^~ /secret {
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpass;
}And your folder should be password protected. :)
Easy peasy.
First we need to create a file called chromium.repo in /etc/yum.repos.d/ and put the following content in it:
[chromium] name=Chromium Test Packages baseurl=http://spot.fedorapeople.org/chromium/F$releasever/ enabled=1 gpgcheck=0
Save and close the file. When done, execute the following command:
# yum install chromiumAnd you’re done. :)
It’s actually not as hard as you think:
# wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz # cd /usr/lib64/chromium-browser/plugins/ # tar -zxvf /root/libflashplayer-10.0.32.18.linux-x86_64.so.tar.gz
Now start up Chromium with:
$ chromium-browser --enable-pluginsWorks great!
August 18, 2009
So the vacation is finally over. Two weeks of pretty much doing nothing. We had some fun though, we got a new digital videocamera, so we were able to record Michael when we went to the zoo. All in all, I’ve never relaxed so much before, ever. But boy did I notice how tough it was to get up at my regular 5.30am in the morning, sheesh. I’ll get used to it, but it’ll take me a while.
Now on to some other things. I’ve probably mentioned before that I was using FreeNAS along with a server that I inherited from my sister-in-law and her husband. Things were going fine, and FreeNAS was working like a dream. Until the machine died. Again. I had enough, and decided to never touch the machine again. Didn’t matter how much I had to suck up to Marte, I was buying a new NAS-machine. And I did.
I proudly present the Synology DS209j.
It has been working like a charm. I’ve tried both NFS, CIFS and UPnP so far (streaming to the Xbox 360 works GREAT!). The only thing is that the re-indexing takes AGES. When you add some new content to the systemfolders (Video, Music, Photo), the new media has to be re-indexed so that the latest addition is in the database. Thus you have a Re-index button. But the button Re-indexes EVERYTHING , so if you have say 80GB worth of data, it might quickly take 15-20-30 minutes to add everything to the database. Why they just don’t add a “Add latest additions to the database”-button is beyond me. I sent in a support-request for it though, so now to see if they’ll include it sometime in the future. No wonder that it takes a while either, the NAS-machine has 64MB memory integrated into the motherboard, and no option to add some more either. With the DS209+ though you can actually add some more memory, but then you’d void the warranty, and you’d have to pay a bit more for the box itself. I paid about 190€ for the DS209j, including shipment, while the DS209+ costs a bit more at around 240€ or so. Everything is set up in a RAID1 array with two 1TB disks in it.
Also, I’ve been kind of hooked on Anime of late. I’ve been watching Avatar – The Last Airbender, Afro Samurai (series and movie), Elfen Lied, and recently gotten hold of Cowboy Bebop and Death Note, which I’ve heard good things about. I am loving them.
Does anyone out there have any more anime to recommend? I eagerly await your answer. :)
August 13, 2009
25th of May 2008 I wrote a post about how you could join multiple files that looked something like movie.avi.001, movie.avi.002 and so on. I found a new tool that does the job a bit easier, lxsplit. The syntax of lxsplit is like so:
[jorge@ashitaka ~]$ lxsplit LXSplit v0.2.4 by Richard Stellingwerff, O. Sezer. Home page: http://lxsplit.sourceforge.net/ Usage: lxsplit [OPTION] [FILE] [SPLITSIZE] Available options: -j : join the files beginning with the given name -s : split the given file. requires a valid size Splitsize examples: 15M, 100m, 5000k, 30000000b Examples: lxsplit -s hugefile.bin 15M lxsplit -j hugefile.bin.001
So to join all our files, we execute:
$ lxsplit -j movie.avi.001And it will join all files named movie.avi.00{1,2,3} and so on. :)
Powered by WordPress