====== Irssi scripts ====== I've uploaded my most commonly used Irssi scripts, that I made myself. Check out the [[tag:script?do=showtag&tag=tag:script|tag page]], it lists them. ====== nginx ====== Based on some benchmarks(([[http://www.qdecoder.org/qhttpd/benchmark/20100303/|qHttpd Benchmark]] qHttpd vs. lighttpd vs. nginx vs. apache2 //(http://qDecoder.org)//))(([[http://w3techs.com/technologies/overview/web_server/all|Usage of web servers for websites]] //(http://w3techs.com)//)) I found on the web, I decided to switch to another web server yet again. I had some trouble getting FastCGI to run nicely, but it seems to be OK now. From what I've gathered, nginx seems to be not only more efficient, when it comes to RAM and CPU usage, but also more reliable, especially concerning lock-ups. Right now, I managed to add FastCGI support for PHP and Lua. I use ''spawn-fcgi'' and ''fcgiwrap'' to facilitate standard CGI support on the server. With those two tools, I created a universal socket for all kinds of CGI scripts. All that needs to be done, is spawning the CGI application with sockets for IO: spawn-fcgi -u www-data -s /var/run/fcgiwrap.sock -P /var/run/fcgiwrap.pid -F 6 -- /usr/local/sbin/fcgiwrap ====== Another Irssi script ====== I'm currently working on a weather script that queries the [[http://cnn.com/weather|CNN.com/WEATHER]] website. Unfortunately, CNN.com does not provide an API for that, so I have to rely on parsing the (partly broken) HTML source. To make that script non-blocking, I try to make it multithreaded, with Perl, which doesn't do threads so well (i.e. I'm using ''fork()''). ====== More IRC related stuff ====== I uploaded my {{noctcp.diff|patch}} to make [[noctcp.diff|Irssi not respond to CTCP requests]]. I have tested against the latest [[http://irssi.org/news/ChangeLog|Irssi 0.8.15]] release. Works wonders. ===== Wikipedia ===== For the time being, you can browse to my [[wp>User:Polemon|user page on Wikipedia]]. I claim to have edited articles there... extern>http://polemon.org/_media/os2_config.sys extern>http://polemon.org/_media/os2-serv_config.sys ====== Recording live on Windows ====== I came across a scenario where I had to record on Windows XP from a live source. The recordings were so long, that they surpassed the maximum file size of WAV (4GB) making it impossible to use WAV as file structure to recode files. Instead, I used raw PCM data. TODO: Make this into an article. This is what I did: rec rec.flac This will get me a default FLAC, a lossless master copy. I use sox to record. To get a Ogg/Vorbis I did: flac -d --force-raw-format --endian=little --sign=signed rec.flac -c | oggenc2 -r -R 48000 -o rec.ogg - I use oggenc2 to encode into Ogg/Vorbis. To get an MP3 I did: flac -d --force-raw-format --endian=little --sign=signed rec.flac -c | lame -r -s 48 - rec.mp3 I use Lame to encode into MP3. To get an MP4 (AAC) I did: flac -d --force-raw-format --endian=little --sign=signed rec.flac -c | qaac -R -o rec.m4a - I use qaac to encode into MP4. It needs Quicktime installed. All software must be accessible from command line (''cmd.exe'') obviously, as well as all files are placed in the current directory. The file characteristics are as follows: * Endian: little * Sign: signed * Channels: 2 * Sample rate: 48kHz * Bits per sample: 16 Those characteristics are considered default by most of the coding software I use. Hence, I can omit most of the meta information normally necessary for encoding PCM. In the examples above, I omitted all switches of encoders for things like quality settings. Generally, the default values are OK for general use. When a better quality is required, it usually comes down to just one added setting: * For AAC: ''-V'' (TVBR) value between 0(lowest) - 127(highest), default: 90. True VBR (TVBR) settings for the qaac encoder is **not** available when using ''--he'', use CVBR or ABR instead. * For Ogg/Vorbis: ''-q '' value between -2(lowest) - 10(highest), default: 3. * For MP3: ''-V '' value between 0(highest) - 9(lowest), ''-h'' should be added as well. Default: 4. All those settings are for VBR encoding, when CBR is required, ''--help'' must be consulted. On MP3 you probably want to use either ''-b '' for the absolute bitrate in kbps. With AAC you'd use ''-v'' vor CVBR (standard on iTunes) or ''-c'' for normal CBR. It is **unwise** to simply convert to MP3 using CBR at 128kbps for use on embedded players. It should be considered to resample to 44.1kHz sampling rate and //then// encode into a CBR MP3. Since the sampling rate is higher, the quality will be considerably lower when using just 128kbps. 44.1kHz is standard for (red book) audio CDs. When using 48kHz it should be considered to increas the CBR to 192kbps, If that is not possible, because the embedded player does not support it, the sampling rate should be lowered to 44.1kHz. I am absolutely aware, that what I'm asking for, is actually RIFF files. So, that would technically work and all, but the problem is, it doesn't work with any of the software I use. Basically, I'm stuck with using files containing nothing but PCM values (and keeping the other meta info somewhere else).