Skip to main content

Posts

Configure proxy for Google Chrome on Linux Command line

google-chrome-stable --proxy-server="http://example.com:3128"
Recent posts

Create a Debian user with ssh access

mkdir /home/user1 useradd user1 passwd user1 chsh -s `which bash` user1 ls -al /home/user1/ cp -a /etc/skel/.[a-z]* /home/user1 chown -R user1.user1 /home/user1 Edit file /etc/ssh/sshd_config and add the following content AllowUsers root user1 Save file. usermod -s "/bin/bash" user1 Finally restart the ssh service by service ssh restart

Wowza Streaming Engine REST API - Monitoring The Status of a STREAM File

This is a small PHP-CURL script, initiates a JSON request to Wowza API to get the realtime status of a STREAM file. Note that the request is protected by Wowza 'AUTHENTICATION - DIGEST' Mechanism. ********************************************************************** $wowzaip = '192.168.166.68'; //replace with your wowza ip address $application = 'live'; //replace with your application name $streamfile = '10-20160527134707366114.stream'; //replace with your streamfile //initiate a curl session $ch = curl_init(); //set http header to json curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Accept: application/json')); //set wowza request url curl_setopt($ch, CURLOPT_URL, 'http://'.$wowzaip.':8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/'.$application.'/instances/_definst_/incomingstreams/'.$streamfile.'/monitoring/current'); //set RETURNTRANSFER true. Now return as string instead of output curl_setop...

Installing phalcon in Debian Jessie (Debian 8)

apt-get update apt-get install git-core gcc autoconf make apt-get install php5-dev php5-mysql Now clone the phalcon git repository git clone git://github.com/phalcon/cphalcon.git cd cphalcon/build Run the install file: ./install Once installation completed, you can see output messages Installing shared extensions:     /usr/lib/php5/20131226/ Installing header files:           /usr/include/php5/ Now edit your php.ini file for enabling phalcon nano /etc/php5/apache2/php.ini Add the phalcon extension at the end of the file: extension=phalcon.so Restart apache to make changes effect service apache2 restart Create a info.php file under your document root and paste the line <?php phpinfo(); ?> Run the info.php in web browser. Search for the keyword 'phalcon' in the resultant page. If you are finding it phalcon has been successfully configured. Otherwise you need to enable the module. cd /etc/php5/mods-available touch...

MySql command line - Print query output containing large number of rows and columns

To print large dataset of records in user friendly way, use any of these options. Option1# (open the records in linux 'less' editor - line by line format)      mysql> pager less;      mysql> select * from table\G; Option2# (open the records in linux 'less' editor - table format)      mysql> pager less -SFX;      mysql> select * from table; Escape character of 'less' is 'q'