Preparing video files for streaming on website in MP4 and WEBM format

Some time ago I prepared a PC that was responsible for batch encoding of movies to formats suitable for web players (such as. Video.js  external link , JW Player  external link , Flowplayer  external link , etc.) I used HandBrake for conversion to MP4 format (becase this soft was the fastest one) and ffmpeg (aka avconv in new version) for two pass encoding to WEBM. Below are commands used by me for that conversion:...

2013-12-16 · 2 min · timor

Ansible - Dynamicaly update /etc/hosts files on target servers

I was configuring GlusterFS on few servers using Ansible  external link and have a need to update /etc/hosts with hostnames for easier configuration. I found this one working: - name: Update /etc/hosts lineinfile: dest=/etc/hosts regexp='.*{{item}}$' line='{{hostvars.{{item}}.ansible_default_ipv4.address}} {{item}}' state=present with_items: '{{groups.somegroup}}' Source: http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html  external link

2013-12-11 · 1 min · timor

Reset user password in your own Ghost Blog

I’ve started testing new Ghost blogging platform for a while on a virtual machine before I take decision about switching to it (or maybe won’t)… After few days, I wanted to go forward with more testing and stuck on “e-mail and password” login prompt 😃 I’ve started looking into files and found ghost_dir/content/data/ghost-dev.db SQLite database. It can be opened like that: sqlite3 content/data/ghost-dev.db Then you could see whats your mail (and other info):...

2013-11-28 · 1 min · timor

Inodes exhaustion on XFS

It’s quite rare to have problems with XFS and inodes exhaustion. Mostly because XFS doesn’t have inode limit in a manner known from other filesystems - it’s using some percentage of whole filesystem as a limit and in most distributions it’s 25%. So it’s really huge amount of inodes. But some tools and distributions lowered limit ex. 5% or 10% and there you could have problems more often. You could check what is you limit by issuing xfs_info with drive and searching for imaxpct value:...

2013-11-27 · 1 min · timor

Kill with SIGSTOP and SIGCONT

I’ve bought a NAS and customized it a little. But there was one thing which make my nights sleepless. NAS was seeking disks every 5~10 seconds - these was really irritating - especially when it was silent in room. I found that part of firmware was indexing or logging something so I wanted it dead! kill -9 was unsuccessful - process restarted after a while…. wrrr… I googled a little and found another signal I could use SIGSTOP, which will freeze process until I send SIGCONT to it - that was exactly what I need (because I normally use NFS/Samba and don’t need nothing more running on this device)....

2013-11-21 · 1 min · timor

My new toy - Iomega StorCenter ix2-200 Cloud Edition

I’ve just bought new toy - Iomega StorCenter ix2-200 Cloud Edition. I have to play with few options before I could start using it. First thing - Firmware upgrade. Firmware upgrade I’ve started searching for latest firmware for ix2-200 Cloud and found that I have to register on Lenovo site to get firmware… I don’t like such sites where they force me to give all private data, but after few clicks on “Recommended articles” on that site I landed here:...

2013-11-19 · 1 min · timor

Debian - zablokowanie aktualizacji pakietu

W teorii nie powinno się blokować aktualizacji pakietów bo łatają dziury itd…. Ale! Zdarzyły mi się ostatnio dwie sytuacje, które do tego mnie zmusiły: aktualizacja hudsona kończyła się błędem przy starcie usługi, aktualizacja domU Xen skończyła się problemem z kompatybilnością mechanizmu udev w systemie i jądrze (hypervisor miał starsze jądro niż spodziewało się DomU). W takich sytuacjach bardzo przydaje się możliwość zablokowania aktualizacji jednej “psującej” paczki na pewien okres czasu by nie opóźniać innych aktualizacji a sobie dać czas na rozpracowanie problemu....

2013-11-05 · 1 min · timor

Uruchamianie aplikacji .NET jako 32-bitowej w 64-bitowym systemie

Kolejna zabawna sytuacja - pewna aplikacja dotNET’owa działała dziwnie na 64-bitowym systemie, a tymczasem na 32-bitowej maszynie ta sama aplikacja działała bez problemów. Jedyna różnica to inne wersje klientów ODBC na tych systemach, które po kilku testach okazały się być przyczyną całego zła. Pojawił się pomysł by odpalić aplikacje na 64 bitowym systemie ale w trybie 32 bit - poniżej krótkie HOWTO jak to osiągnąć: potrzebujemy narzędzia corflags.exe które pozwoli oznaczyć nam binarkę jako 32-bitową, do pobrania tutaj  external link a instrukcja jej użycia tutaj  external link ....

2013-10-29 · 1 min · timor

Certyfikaty nazwaSSL na własnym serwerze

Od jakiegoś czasu można kupić w NetArcie certyfikaty SSL, a niedawno zrobili na nie promocję - 15zł za pierwszy rok (za certyfikat na jedną stronkę). Tzw. tanie i dobre. Po wyrobieniu certyfikatu i zapisaniu z panelu klienta mam pliczki: stonka.crt i netart_rootca.crt, które wrzucamy do Apachego, powiedzmy tak: SSLCertificateFile /etc/ssl/certs/stonka.crt SSLCertificateKeyFile /etc/ssl/private/priv.key SSLCACertificateFile /etc/ssl/certs/netart_rootca.crt Certyfikat działa w Chromie ale nie weryfikuje się w Firefoxie i Internet Explorerze. FF wyświetla błąd: sec_error_unknown_issuer - co oznacza brak certyfikatu wystawcy gdzieś w łańcuchu certyfikatów....

2013-10-22 · 2 min · timor

Postfix: ciekawy problem z smtpd_delay_reject i permit_sasl_authenticated

Trafił mi się ostatnio ciekawy problem - otóż standardowo przed końcem roku poprawiałem filtry antyspamowe i optymalizowałem konfigurację Postfix’a. Chciałem zmienić domyślną wartość smtpd_delay_reject=yes na smtpd_delay_reject=no by odrzucać spamerów najwcześniej jak to możliwe. I ciekawe kuku, które sobie zrobiłem polegało na tym że sam nie mogłem wysyłać poczty po logowaniu SSL’em… Dostawałem przy tym bardzo wymowną odpowiedź: Oct 8 16:30:39 tyr postfix/smtpd[21039]: NOQUEUE: reject: CONNECT from unknown[67.x.x.x]: 554 5.7.1 <unknown [67....

2013-10-08 · 2 min · timor