Perpetual rsync


Automatically resume rsync over SSH after broken connection
Create a file in /bin/prsync


#!/bin/bash
### COPY IN /bin/prsync - chmod 777 ###
# GitHub https://gist.github.com/pwenzel/4182838
# Extended by Gulshan Beejan - Persistent RSYNC# Make sure remote system has ssh key pairsif [[ -z $1 ]] ; then
echo "Persistent RSYNC Usage: prsync SOURCE DESTINATION"
exit
fi
if [[ -z $2 ]] ; then
echo "Persistent RSYNC Usage: prsync SOURCE DESTINATION"
exit
fiwhile [ 1 ]
do
rsync -avz --partial $1 $2
if [ "$?" = "0" ] ; then
echo "prsync completed normally"
exit
else
echo "==== prsync failure. ==== Backing off and retrying in 30 seconds..."
sleep 30
fi
done


chmod +x /bin/prsync

then you can run it as:

prsync mysource_file.tar user@destination_ip:/path/to/file

Read More

Linux: Sudoers


What is it?

Sudoers is a list of users which may execute root commands. A sudoers file is made up of two types of entries, aliases and user specifications

How to set it up?

Do a visudo on command line, then add the user to the list as below.

If you want to enter the user’s password before executing the command:

myuser ALL=(ALL) ALL

And without a password:

myuser ALL=(ALL) NOPASSWD: ALL

 

Read More

HTML PHP Special Characters showing question mark


I was developing a french website for a customer yesterday and at the same time, when I was templating the site to php, I found out that all the french accents got turned into a question mark, �  <– this really..

What’s wrong?

I already had UTF-8 in my headers

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

and it was still not working.

Resolution:

It turns out that I had not saved the file in UTF-8, so I had to open up Notepad++ which is my main coding IDE, and go to Encoding -> Convert to UTF-8 without BOM

Solved!

Read More

HTC Evo 3D – The REVIEW


Released in 2011, the superphone was deployed on the market with the powerful mobile operating system, Android 2.3 Gingerbread. The price range of the EVO 3D is approximately Rs. 23,000 on the market.

The Design and the Display

The phone build quality is very well done. It feels very sleek and light although the dimensions are 126mm by 65mm by 12.1mm at
168grams. The back cover is impressive with the details. It comes with corning gorilla glass screen to help protect against scratches.

The Screen size: 4.3″ with 3D Display

The picture clarity, color and 3D effect in still photo is clear in the HTC EVO 3D but a bit lacking on the video side. The 3D effect was relatively easy to see even though 3D is a perception which is tricky to judge.

The Camera

The EVO comes with dual 5-megapixel rear cameras which can record in 720p resolution for both 2D and 3D as well as dual led flashes, and a single 1.3-megapixel camera in the front. The EVO has a dedicated button for the camera as well as a switch button between 2D and 3D.

The Interface

The user interface is powered by HTC Sense 3.0, which is pretty fancy and easy to use. The ability to directly access things like the phone, camera and even gmail from the lock-screen is a plus point. The visual aspect of the EVO 3D is nicely done, specially the weather app, the Facebook integration for sync and the high resolution screen really powers the phone from being a smartphone to a superphone.

 

Google Ads


Under the Hood

The EVO 3D uses a Qualcomm MSM8660 which falls under Snapdragon S3 class processors which delivers fast, seamless performance for multitaskers that want to do it all on their phone. A S3 class comes with a Dual Core 1.5 GHz processor, an Adreno 220graphics processor which is the source for delivering Stereoscopic 3D capture & playback as well as the ability to stream movies in 1080p HD with Dolby 5.1 surround sound. The phone’s speed has been capped at 1.2 GHz.

The phone is HDMI capable but needs an HDMI MHL Adapter which is available in some stores in Mauritius. It also comes with a 1GB RAM internal memory for your multi-tasking applications, 1GB of internal storage to store your downloaded applications and configuration settings. The microSD slot which usually comes with an 8GB microSD card can be upgraded to up to 32GB.

Downside

To all good things, there must be a downside. The Battery life!! It will last only up to 10-12 hours on standby with WiFi activated on demand and 3G/HSPDA always active. Talk time is around 5 hours. But the remedy to this is to upgrade to ICS, which will be rolled out officially in September this year.

I upgraded to ICS unoffical mod, see the article.

Comparison to LG Optimus 3D

You may read the article I wrote on the comparison between HTC EVO 3D and the LG Optimus 3d on OMG! Magazine. www.omgvogue.com

What’s your opinion on this?

Post a comment for an open discussion.

Read More