Fix blue border issue in full screen mode in smplayer and mplayer

In smplayer, add the following in Options>Preferences>Advanced:

Mplayer Options: -vo x11

selection_001


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.
Merging pdf files

Merging pdf files

I’d like to talk about a nifty little utility that helps to combine multiple pdf files into one big file. Of course this is available in Adobe Acrobat Professional, but that’s a heavy weight and expensive software. If you’re good with Linux, you can try your luck with pdftk or ghostpdf. However those command line utilities require a good amount of technical knowhow and have a learning curve. If you use Windows, this small utility from A-PDF might just be your cuppa.

A-PDF Merger can be downloaded from A-PDF site. Once you install it, open it to get the following screen:

mwsnap001

Just drag all the required files and rearrange the order as you see fit. Once you click merge, the files are merged, and you get confirmation whether to open the output file. A-PDF Merger gives you a host of advanced options including a renumbering option and a bookmark addition for each file. A TOC option would have been a great addition. Maybe the authors will add it later.

Download A-PDF Merger and give it a try.


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

How to compile latest mplayer on Ubuntu?

echo Installing some essential packages.. && \
sudo apt-get -y install build-essential subversion checkinstall git-core \
docbook-xml docbook-xsl xsltproc libxml2-utils && \
mkdir -pv $HOME/mplayer_build && \
cd $HOME/mplayer_build && \
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz && \
tar xvf yasm-1.3.0.tar.gz && cd yasm-1.3.0 && \
./configure && make -j 2 && \
mkdir -vp doc-pak && \
cp -v Artistic.txt AUTHORS COPYING doc-pak && \
sudo checkinstall --pakdir "$HOME/mplayer_build" --backup=no --deldoc=yes \
                  --pkgname yasm --pkgversion "1.2.0" --fstrans=no \
                  --deldesc=yes --delspec=yes --default && \
make distclean && \
echo Installing some dev packages.. && \
echo sudo apt-get -y install libaa1-dev libasound2-dev libcaca-dev libcdparanoia-dev libdca-dev libdirectfb-dev libenca-dev libesd0-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libgif-dev libgl1-mesa-dev libjack-jackd2-dev libopenal1 libpulse-dev libsdl1.2-dev libvdpau-dev libxinerama-dev libxv-dev libxvmc-dev libxxf86dga-dev libxxf86vm-dev librtmp-dev libsctp-dev libass-dev libfaac-dev libsmbclient-dev libtheora-dev libogg-dev libxvidcore-dev libspeex-dev libvpx-dev libschroedinger-dev libdv4-dev libopencore-amrnb-dev libopencore-amrwb-dev libmp3lame-dev liblivemedia-dev libtwolame-dev libmad0-dev libgsm1-dev libbs2b-dev liblzo2-dev ladspa-sdk libopenjpeg-dev libfaad-dev libmpg123-dev libopus-dev libbluray-dev libaacs-dev && \
echo && \
sudo apt-get -y install libaa1-dev libasound2-dev libcaca-dev libcdparanoia-dev libdca-dev libdirectfb-dev libenca-dev libesd0-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libgif-dev libgl1-mesa-dev libjack-jackd2-dev libopenal1 libpulse-dev libsdl1.2-dev libvdpau-dev libxinerama-dev libxv-dev libxvmc-dev libxxf86dga-dev libxxf86vm-dev librtmp-dev libsctp-dev libass-dev libfaac-dev libsmbclient-dev libtheora-dev libogg-dev libxvidcore-dev libspeex-dev libvpx-dev libschroedinger-dev libdv4-dev libopencore-amrnb-dev libopencore-amrwb-dev libmp3lame-dev liblivemedia-dev libtwolame-dev libmad0-dev libgsm1-dev libbs2b-dev liblzo2-dev ladspa-sdk libopenjpeg-dev libfaad-dev libmpg123-dev libopus-dev libbluray-dev libaacs-dev && \
cd $HOME/mplayer_build && \
sudo mkdir -pv /usr/local/lib/codecs && \
if [ "$(uname -m)" = "x86_64" ]; then
 wget http://www.mplayerhq.hu/MPlayer/releases/codecs/essential-amd64-20071007.tar.bz2
 tar xjvf essential-amd64-20071007.tar.bz2
 sudo cp -v essential-amd64-20071007/* /usr/local/lib/codecs
else
 wget http://www.mplayerhq.hu/MPlayer/releases/codecs/all-20110131.tar.bz2
 tar xjvf all-20110131.tar.bz2
 sudo cp -v all-20110131/* /usr/local/lib/codecs
fi
if [ "$(uname -m)" = "x86_64" ]; then
  ARCHOPTS="--enable-pic"
 else
  ARCHOPTS=""
fi && \
cd $HOME/mplayer_build && \
git clone git://git.videolan.org/x264.git --depth 1 && \
cd x264 && \
./configure --prefix=$HOME/mplayer_build/mplayer_deps/usr \
            --enable-static --disable-cli $ARCHOPTS && \
make && make install && \
echo Compiling mplayer...
cd $HOME/mplayer_build && \
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer && \
cd mplayer && \
PKG_CONFIG_PATH="$HOME/mplayer_build/mplayer_deps/usr/lib/pkgconfig" \
./configure \
           --extra-cflags="-I$HOME/mplayer_build/mplayer_deps/usr/include" \
           --extra-ldflags="-L$HOME/mplayer_build/mplayer_deps/usr/lib" \
           --confdir=/etc/mplayer \
           --codecsdir=/usr/local/lib/codecs && \
make -j 2 && make html-chunked && \
mkdir -vp doc-pak && \
cp -v DOCS/HTML/*/* AUTHORS Changelog LICENSE README doc-pak && \
sudo checkinstall -D --install=yes --fstrans=no --pakdir "$HOME/mplayer_build" \
   --pkgname mplayer --backup=no --deldoc=yes --deldesc=yes --delspec=yes --default \
   --pkgversion "2:1.0~svn$(LC_ALL=C svn info 2> /dev/null | \
     grep Revision | cut -d' ' -f2)" --provides "mplayer,mencoder" && \
make distclean && sudo ldconfig

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Get detailed information about the type of RAM on your PC

wmic MEMORYCHIP get >data.txt
start data.txt

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

How to install Velocity addon in Kodi

1.
System>File Manager>
Add Source: http://fusion.tvaddons.ag
Name as ‘Fusion’
Done

2.
System>Settings>Addons>Install from zip file>Fusion>xbmc repos>English>repository.BlazeRepo.x.x.x.zip

3. System>Settings>Addons>Install from repo>Blazetamer’s repo>Video addons>Velocity>Install


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

How to use superscript Vancouver citation

First install Mendeley Desktop, and make sure the Word plugin works.
Next in Word, References>Style>More styles
This will open Mendeley Citation Styles
Citation Styles>Get more styles>Download style:
Enter: https://www.zotero.org/styles/vancouver-superscript
and click on Download, and then Done.
It will ask for a name. Enter “Vancouver-Superscript”.


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Extend wordpress-notification-bar wordpress plugin

So.. I was using this nice plugin called wordpress-notification-bar to show a..yea, you guessed it.. a notification bar. My use was to show the bar to tell users that to download premium content, they need to login. Unfortunately, the plugin didnt offer such an option. So I decided to extend it.

First, I tapped into the Settings page and added an option to put a checkbox to allow users to choose whether they wanted such an option:

$seed_wnb->options[ ] = array(
    "type" => "checkbox",
    "id" => "disabledloggedin",
    "label" => __( "Disable for Logged in", 'wordpress-notification-bar' ),
    "desc" => __( "Check if you want to disable the notification bar if the user is logged in.", "wordpress-notification-bar" ),
    "option_values" => array(
        '1' => __( 'Yes', 'wordpress-notification-bar' )
    )
);

Next I needed to check whether the option was enabled, and the user was logged in, and disable the bar in such a case:

if ( isset($options['disabledloggedin']) && is_user_logged_in() ) {
  return false;
}

The final patch is this:

 #diff -rupN wordpress-notification-bar wordpress-notification-bar-patched
diff -rupN wordpress-notification-bar/inc/class-plugin.php wordpress-notification-bar-patched/inc/class-plugin.php
--- wordpress-notification-bar/inc/class-plugin.php     2013-05-29 17:56:26.000000000 +0530
+++ wordpress-notification-bar-patched/inc/class-plugin.php     2016-08-20 23:10:43.000000000 +0530
@@ -17,7 +17,10 @@ class SeedProd_WordPress_Notification_Ba
                $options = get_option('seed_wnb_settings_1');


+
        if(!empty($options)){
+
+

                if(isset($options['enabled'])){
                        add_action( 'wp_enqueue_scripts', array(&$this,'render_notification_bar') );
@@ -32,6 +35,13 @@ class SeedProd_WordPress_Notification_Ba
     function render_notification_bar($hook){
        global $seed_wnb;
         $options = $seed_wnb->get_options();
+       /* Code added by Joel G Mathew, to disable notification bar if user is logged in\
+       // Dont show bar if user is logged in
+       */
+               if ( isset($options['disabledloggedin']) && is_user_logged_in() ) {
+                       return false;
+               }
+       // End of Code to disable bar if logged in

         if($hook == 'settings_page_seed_wnb' || ! is_admin() && isset($options['enabled'])){
                $button_target = '_self';
@@ -51,7 +61,7 @@ class SeedProd_WordPress_Notification_Ba
         }
     }

-    function render_css(){
+    function render_css(){
        global $seed_wnb;
        $options = $seed_wnb->get_options();

diff -rupN wordpress-notification-bar/inc/config.php wordpress-notification-bar-patched/inc/config.php
--- wordpress-notification-bar/inc/config.php   2015-10-02 13:08:38.000000000 +0530
+++ wordpress-notification-bar-patched/inc/config.php   2016-08-20 22:56:35.000000000 +0530
@@ -70,7 +70,19 @@ $seed_wnb->options[ ] = array(
         '1' => __( 'Yes', 'wordpress-notification-bar' )
     )
 );
-
+/* Code added by Joel G Mathew, to disable notification bar if user is logged in\
+        // Dont show bar if user is logged in
+        */
+$seed_wnb->options[ ] = array(
+    "type" => "checkbox",
+    "id" => "disabledloggedin",
+    "label" => __( "Disable for Logged in", 'wordpress-notification-bar' ),
+    "desc" => __( "Check if you want to disable the notification bar if the user is logged in.", "wordpress-notification-bar" ),
+    "option_values" => array(
+        '1' => __( 'Yes', 'wordpress-notification-bar' )
+    )
+);
+// End of Code to disable bar if logged in

 $seed_wnb->options[ ] = array(
     "type" => "textbox",

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Extending wordpress-notification-bar to hide notification bar if user is logged in

So I needed a notification bar to warn users that they were not logged in. This plugin was useful but it didnt have an option to hide the bar for logged-in users. So I edited it to add this functionality:

diff -rupN wordpress-notification-bar/inc/class-plugin.php wordpress-notification-bar-patched/inc/class-plugin.php
--- wordpress-notification-bar/inc/class-plugin.php 2016-08-20 20:44:25.000000000 +0530
+++ wordpress-notification-bar-patched/inc/class-plugin.php 2016-08-20 20:42:23.000000000 +0530
@@ -30,6 +30,15 @@ class SeedProd_WordPress_Notification_Ba
}

function render_notification_bar($hook){
+ /* Code added by Joel G Mathew, to disable notification bar if user is logged in\
+
+ // We need to disable in this function.
+ // Dont show bar if user is logged in
+ if ( is_user_logged_in() ) {
+ return false;
+ }
+ */
+
global $seed_wnb;
$options = $seed_wnb->get_options();

You can patch with patch -1


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.
A review of Reliance Jio, the upcoming 4G behemoth

A review of Reliance Jio, the upcoming 4G behemoth

Reliance-Jio

Reliance Jio is an upcoming 4G service provider. Though the name Jio isnt a household name, the brand is far from being unknown. It’s a subsidiary of Reliance Industries, headed by the Mukesh Ambani. Though it may sound like yet another 4G provider in a market saturated by existing ventures, Jio is exciting for one reason-VOLTE, or voice over LTE. While existing telecom providers offer voice through the existing 2G spectrum, calls originating in Jio network travel as data packets through 4G network. As such, theoretically the calls ought to be crisper (since more high quality voice data can be transferred when the medium is high bandwidth 4G network) and cheaper. I read that Jio’s vision is to provide LTE data that’s affordable to everyone. Gauging by the prelaunch offers Jio provides, one can definitely expect something awesome.

Having a friend who works in Jio, I had early bird access to a Jio sim. My experience with the fledgeling service was nothing short of enthralling. Awesome download speeds and great clarity were the norm with the occasional disconnection. Initially I could use only data on my Oneplus One, since the phone didn’t support VOLTE. But Jio soon rectified this and paved the way for the masses to experience firsthand, something than can be described as nothing short of exciting. For the first time, one could experience excellent data speeds which Indians had hitherto only dreamed of.

IMG_20160729_215809-01

Jio is now impeding launch, and tens of thousands of Indians are now putting Jio’s bandwidth to the ultimate test. Jio initially offered its preview offer to employee sims, and thereafter open the doors to owners of selected Samsung high value phones. Then, knowingly or unknowingly, they left open a “bug” which allowed owners of other brands 4G handsets to register to the service and experience the “in-thing”. If you ask me, it was not a bug. Most probably at some high level of the management, they may have made a conscious decision to allow other customers access to the service. For the best way to engender curiosity and improve market presence by marketing is passive marketing, by word of mouth. Jio didnt even need to launch ads, already there’s a huge demand for their sim cards.

Word is rife in Whatsapp and Telegram groups that people are even reselling employee sims at a huge price because of the sheer demand for a Jio sim!

Anyway, the speeds of Jio have been excellent. The following is a speedtest that I did today at Kochi. Let the figures speak for themselves:

Screenshot_20160729-133119

Anyway, one thing is clear, Reliance Jio will give the rest of the service providers a nightmare once it releases! For consumers, it’s a dream come true.

It’s not fair to be critical of Jio at this point of time when it has not yet commercially launched. However, the following sum up my experience with Jio:

Call quality: Calls on Jio require either a VOLTE supported handset. If you don’t have one, don’t despair, because the company has launched an Android app, Jiojoin which helps non-VOLTE handset users make calls (including video calls), send sms and more. The app does its work, but it could have been better designed. The fonts are small, and the interface unintuitive. It also seems to hold wakelocks, which are never a good idea, since it drains your battery quickly. Once the app is redesigned and the bugs removed, everyone can join the VOLTE bandwagon. Oh and did I mention that as a preview offer, All India calls are free for 90 days?

Data: This is the awesome part of Jio. Internet connectivity is excellent, barring the occasional disconnection (location specific no doubt). In Trivandrum at least disconnection rate is very high, and it’s difficult to make calls without getting disconnected very soon. By the looks of it, Jio is working hard to fix their network.

Jio may very well deliver on its promises of “shaping the future of India by providing end-to-end digital solutions for businesses, institutions and households and seamlessly bridging the rural-urban divide.”.

 


You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.

Enabling mega.nz download in plowshare

plowmod -i [email protected]:droidzone/plowshare-module-mega.git
cd ~/.config/plowshare/modules.d/mega.git
./autogen.sh
./configure --enable-local
sudo make install

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.