Posts

Showing posts from 2014

Speed up your Wordpress 1.000x with REDIS

I was bored so I decided it was time to upgrade my server with new distro and switch to NGIX. My current installation was Debina6 PHP5.3 running Lighty web server. My typical cached server response was around 1s. Considering my server uses 12 CPUs this was really bad. But the page load is low and I didn't care to much:) Having problem with apt-get dist-upgrade  in the past I decided rather to install fresh version of debian/jessi  I like jesse because I got accustomed with systemd and jessie is finnaly on board with it. I decided that I will also cut down on number of CPUs down to just 4 (AMD Buldozer 2Ghz) and 4Gb of ram. So my new LAMP stack is now LNMP. Just migrating to NGINX and enabling OPCache the typical response time became 3-4x faster on 3x less CPUs. I didn't bother with server load at this point since this was just learning exercise. Now my page load time was about 300ms. Things are getting brighter I thought. But I was not happy yet. I found a great tu

Transcoding RM and WMA with Node.js under Windows

I just love Node.js! You can do just about anything with it. My task was to transcode media files and keep the folder structure. I also had to check for media ype. RM videos, RM audio and WMA audio files were used at input. Attention! If you are planning to try it out you must install ffpmeg , mencoder and ffprobe . Make sure you add installed files to Windows path! So first I used 'final-fs' => ' npm install final-fs ' to read all files from my input forder and create the same folder structure at my output. Because each file was different I had to use ffprobe => ' npm install node-ffprobe ' to inspect media info. I using under windows you have tho change source file so it uses win-spawn. So also you need to 'npm install win-spawn'. We will also need win-spawn to spawn ffmpeg or mencoder processes... So after we get media file info we are ready to use the appropriate codec... You can check the code here. The code is robust because I to

Update Windows path without reboot

I really need this all the time! http://dustindavis.me/update-windows-path-without-rebooting.html Cheers!

Simple way to copy multiple files under windows

The problem was simple. I had to copy a whole lot of files (from a txt file) from one location to another in order to optimize file structure. I was thinking about using batch scripting but than I realized that the only thing I really need is to use copy.exe. So other stuff like opening file, reading it line by line, parsing the line could be done in some simple manner. So I choose python that I haven't used since collage and give it a try. Phython is simple and all you need to do is just install execution environment, write a couple of line of code and It should work just fine. So my input was: 154612818,28/21/BucenvstopvnovoletopovsejSlovenijix201301011400x700000x351x413x.mp4,2013/01/01/BucenvstopvnovoletopovsejSlovenijix201301011400x700000x351x413x.mp4 154612866,28/71/PrviletosnjinovorojenecjeAnjurx201301011334x700000x351x413x.mp4,2013/01/01/PrviletosnjinovorojenecjeAnjurx201301011334x700000x351x413x.mp4 154612881,28/84/Praznovanjenovegaletaposvetux201301011407x700000x351x41