Posts

NatGeo - Download a month's photos

NG_download_month.sh #!/bin/sh CYAN='\033[0;36m' YELLOW='\033[1;33m' NC='\033[0m' # No Color currentPath=`pwd` currentYear=`date +"%Y"` currentMonth=`date +"%m"` downloadYear=$1 downloadMonth=$2 force=$3 if [ $# -lt 2 ] then echo "YEAR and MONTH arguments required; eg: ./NG_download_month.sh 2017 06" exit fi jsonFilename="gallery."$downloadYear"-"$downloadMonth".json" if [ $currentYear -eq $downloadYear -a $currentMonth -eq $downloadMonth ] then echo "${CYAN}Current month${NC} images get update. Deleting file: $jsonFilename" rm $jsonFilename elif [ $force == '-f' ] then echo "Force deleting file: $jsonFilename" rm $jsonFilename fi if [ ! -f $jsonFilename ] then echo "${YELLOW}$jsonFilename${NC} unavailable. Downloading..." # BASE_URL="http://www.nationalgeographic.com/photography/photo-of-the-day/_jcr_content" BASE_URL="https://www.

National Geographic Photo of the Day - Mac Desktop Wallpaper

Note: this post is truly for educational purpose. National geographic Website publishes photo of the day on a daily basis on http://www.nationalgeographic.com/photography/photo-of-the-day . Following is a script which will automatically download and apply the image as wallpaper. (Only wallpaper applying is mac script, downloading part is linux.) #! /bin/sh currentPath = ` pwd ` rm gallery . json curl 'http://www.nationalgeographic.com/photography/photo-of-the-day/_jcr_content/.gallery.json' -o gallery . json photoOfTheDay = `cat gallery . json | python -c "import sys, json; gallery = json.load(sys.stdin); print gallery['items'][0]['url'] + gallery['items'][0]['originalUrl']" ` filename = `cat gallery . json | python -c "import sys, json; gallery = json.load(sys.stdin); print gallery['items'][0]['publishDate'] + '.' + gallery['items'][0]['title']" ` echo 'image url

Android "fastboot" driver installation

Image
Steps: Download  adb-setup-1.3  from  here  and install. Enable USB debugging ( Help ) Power off phone and start by pressing POWER+VOLUME_UP to enter FASTBOOT connect USB to PC and wait for driver installation. In case of failure, Follow steps below, Open  Computer Management

Xolo Play - Android ROM flashing for Dummies

Image
To start with, I'm a dummy too :-P I know you might not wanna hear all my failure stories, so to be short, i'll present you with the easy working model. I'm not responsible for damaging your phone or voiding warranty. In this procedure, you will do most of the job from your mobile, which means the kernel will be untouched. So mostly you are out of danger from bricking your phone. This procedure is to flash MIUIv5 into Xolo Play mobile. MIUI is using nearly 60% of RAM most of the time making apps running a little slow. otherwise the UI is smooth. It's my phone screenshot(MIUI screenshot app) with only required apps all in one screen (MIUI doesn't have Menu, all apps on desktop) Steps: You need a rooted phone. This will void warranty. open dialer and type *7813294# ( Source: droidiser.com ) Follow the instruction and that's it. You might also need  Superuser app  to give root permissions to apps. If you have External Micro SD card, the

Context menu for jpg images to set them as Windows 7 logon screen background

Make sure the below file exits. "C:\Windows\System32\oobe\info\backgrounds\backgroundDefault.jpg" or create one with any image file (file size should be below 256 kb). Give full access rights to your user. save the below text as some .reg file and double click on it. Accept the confirmation. Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\jpegfile\shell\Set as logon background] [HKEY_CLASSES_ROOT\jpegfile\shell\Set as logon background\command] @="cmd /C copy /Y \"%1\" \"C:\\Windows\\System32\\oobe\\info\\backgrounds\\backgroundDefault.jpg\"" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background] "OEMBackground"=dword:00000001 You are done. Make sure that default application for jpg file is "Windows Photo Viewer" and the files you choose should be below 256 kb size. The image will stretch in the logon screen to its dimensions.

Access office computer from anywhere without a VPN connection

Image
You can run any one-line command in your office PC from anywhere just by sending the command through mail. You can get to know the ipconfig with this. Requirements: Office computer should be running some windows version MS Outlook should be the mail client. Steps: Open Outlook and press Alt+F11. This will open VB script editor. Alternatively you can open this through menu Tools > Macro > Visual Basic Editor. Copy paste the below code in the window appears. ' Author : Stalin Gino S Sub RunCommand(Item As Outlook.mailItem)     'Open mail, adress, attach report     Dim strMsg     Const olMailItem = 0          Dim comm As String     Dim sFileName As String     Dim iFileNum As Integer     Dim sBuf As String     sFileName = "D:\RunCommandOut.txt"          Set objShell = CreateObject("WScript.Shell")     comm = Split(Item.Subject, ":")(1)     i = objShell.Run("cmd /c " & comm &