In this blog post we will show you how you can stream Video on Demand through HLS protocol, using only free open-source tools, as nginx web server and ffmpeg. First of all, let’s explain shortly what HLS is. HTTP Live Streaming (also known as HLS) is an HTTP-based media streaming communications protocol implemented by Apple.… Continue reading HLS Video on Demand streaming
How to play HLS with JWPlayer
In this post we will show you a simple way how to play HLS into web browser with JW PLayer – the free version. Even on JW Player website is saying you need the Premium version for HLS, we found it is working also with the free version together with HLSprovider plugin. We assume the… Continue reading How to play HLS with JWPlayer
How to do VoD with nginx
You can read my last post on LeaseWeb Labs – Streaming Video on Demand with nginx and RTMP Module
Find the wireless password on Ubuntu
How many times happen to have a guest that asks you about the wireless password and you cannot remember it? On Ubuntu Linux, you can easily retrieve the wireless password like this: [code language=”bash”] sudo cat /etc/NetworkManager/system-connections/YOUR_NETWORK_NAME_HERE | grep "psk=" [/code] The output will be something like: [code language=”bash”] psk=myultrasecretpassword [/code]
Cassandra cannot parse ‘my_key’ as hex bytes
If you have “cannot parse ‘whatever_my_key’ as hex bytes” when you try to query Cassandra for some data, as in example below: [code language=”bash”] [default@CassandraCluster] get ServerLog[‘my_key’] limit 10; org.apache.cassandra.db.marshal.MarshalException: cannot parse ‘my_key’ as hex bytes [/code] then you must set the client-side encoding with assume command: [code language=”bash”] [default@CassandraCluster] assume ServerLog keys as utf8;… Continue reading Cassandra cannot parse ‘my_key’ as hex bytes
Ubuntu 12/13 install and configure Java JRE
1. Download JRE 7 from Oracle website. 2. Unarchive the file: [code language=”bash”] tar zxpvf jre-7u25-linux-x64.tar.gz [/code] 3. Create the installation directory [code language=”bash”] sudo mkdir -p /usr/lib/jvm/ [/code] 4. Move the unarchived directory in the newly created one [code language=”bash”] sudo mv ./jre1.7.0* /usr/lib/jvm/jre1.7.0 [/code] 5. execute this wonderful command: [code language=”bash”] sudo update-alternatives… Continue reading Ubuntu 12/13 install and configure Java JRE
Web server in one line of bash
If you want to quickly save a file through http but you don’t want to install a web server, you can just use netcat. You can run: [code language=”bash”] while true; do { echo -e ‘HTTP/1.1 200 OK\r\n’; cat index.html; } | nc -l 8080; done [/code] index.html can be any file you want to… Continue reading Web server in one line of bash
Example for singleton decorator pattern in python
I know there is not very common in Python to use the singleton pattern, but I found a nice implementation of this pattern in Python 3 Patterns, Recipes and Idioms book. Starting with that example I implemented an equivalent of the well known PHP getConnection example. You have the code below: This is the class that… Continue reading Example for singleton decorator pattern in python
Install MySQLdb for Python 2.x
If you want to install MySQLdb for Python 2.x, without using the package manager of your Linux distro (Ubuntu in our case), you can do it through pip like this: First you must to have installed libmysqlclient-dev (and, of course pip) [source language=”bash”] sudo apt-get install libmysqlclient-dev [/source] After that execute this two commands: [source… Continue reading Install MySQLdb for Python 2.x
Delete Google Analytics Profile/Website
It took me a while to figure out how to delete a Property (web site) from Google Analytics, mainly because is not so obvious and also Google Help… actually doesn’t help too much. In your Google Analytics account: 1. Click on the Property you want to delete (eg: razvantudorica.com). 2. Click on first profile (eg:… Continue reading Delete Google Analytics Profile/Website