How to: Get Spotify Premium working outside US

Music streaming services like Spotify and Rdio are pretty awesome, but there’s an annoying thing about them – they aren’t available in most non-US countries.

If you’re in a country like India, where Spotify isn’t yet available, here’s a trick to get it working. Getting Spotify Free to work is easy, as all you need is a US proxy, but here we’ll see Spotify Premium.

Spotify Premium

Spotify Premium is a paid subscription plan of Spotify with which you’ll get unlimited access to music, on both mobile and desktop.

The problem here is, Spotify accepts credit cards only of the country you have signed up under. In this case, it’s US. And it’s obviously hard to get a US credit card.


The trick here is to use Entropay card for payments. It works because Spotify has recently released in Malta – that’s the country Entropay is based off.

So here’s the process.

  1. Go to Tunnelbear and download the software. It’s a VPN service for accessing US/UK-only websites.
  2. Turn on Tunnelbear and choose US as country. It’ll take a few seconds to connect.
  3. Now go to Spotify and create a new account. Then download apps for your platform.
  4. Now go to Subscription page and add a new payment method.
  5. Now add your Entropay card as a new payment method and your country will be changed to Malta automatically. If you don’t have an Entropay card, create one.
  6. You can now try out the 30-day Spotify Premium trial. As the trial gets expired, your Entropay card will automatically be charged for subscription.

That’s all! With Spotify Premium you can listen to unlimited number of songs on desktop/mobile and even have them for offline listening. All this without a VPN or proxy.

If you couldn’t get the trick working, just leave out a comment. We’ll help you out.


Asepsis: Get rid of .DS_Store files on OS X

If you’ve been using Mac since a long time, you must have encountered ‘.DS_Store’ files sometime. These are hidden files which get created in Finder automatically, and you can find them in almost every folder on your Mac!

A ‘.DS_Store’ file contains preferences related to the folder and contains information like position of icons, view settings and etc. meta data. All this sounds fine, but if you’re a developer, you’ll surely hate this as these files get into your project folder.

Here’s how you can get rid of these hidden files.

No .DS_Store files found

There’s a tool called Asepsis, which does this. Asepsis creates a wrapper around Apple’s framework DesktopServicesPriv which is responsible for creation of .DS_Store files. This wrapper will redirect all the .DS_Store files into a single folder. The exact path of this folder is /usr/local/.dscage.

Asepsis is available as a .mpkg file, so you’ve to install it manually. You’ve to restart your Mac to complete installation and Asepsis will start to run in background. So the next time a .DS_Store file gets created, it goes into the .dscage folder (which is where all .DS_Store files reside).


But Asepsis itself won’t migrate the existing .DS_Store files. For that, you have to fire up terminal and run its command line utility.

Running asepsisctl migratein will migrate all the .DS_Store files from your home directory to .dscage folder. But that’s not all! If you have websites in your /Applications, like me, you have to run asepsisctl --root /Applications migratein. This is because I have my WordPress site under MAMP which is in /Applications/ (and I obviously don’t want .DS_Store files in my site folder).

After you’ve done all this, you can check if .DS_Store files exist in a folder, by running –
find . -iname .ds_store.

One important thing to note is, Asepsis won’t work on Mavericks and you might even run into booting issues if you try to install it.

Thanks to Rakshit Thakker for the geeky tip!

Link: Asepsis


Play Music files in Terminal in OS X

If you’re a developer and use a Unix-like OS, you must be spending a good amount of time inside the shell. Here’s a nice, little tip on how to play Music with in the command line interface, in OS X.


OS X ships with a CLI utility called afplay. There’s not much documentation available, even the man page doesn’t show its options. But it’s there and more importantly, it works.

To use it, pass a Music file’s path in the command, like this:


afplay ~/Music/song.mp3

I guess it works for all Music files, regardless of the type (I tried it with .m4a and it worked fine). To stop the play, you can of course hit Ctrl + C and the shell will terminate it.
You can also play Music in background by appending an ampersand to the command, like this:

afplay ~/Music/song.mp3 &

This will allow you to use the shell while the Music is playing in background. To stop it, you can do killall afplay.

You can also use Quicklook’s CLI to play Music files. The utility is named qlmanage. It basically throws a Quicklook pop up of any file you pass as an argument. So it works fine for Music files too.


If you like this, you might want to take a look at some useful Quicklook plugins. Also, thanks to Rakshit Thakker for the tip!


5 Plugins to Power Up Quick Look on Mac for browsing code

Quick Look on OS X is a really neat feature allowing you to browse and preview files in Finder. The best part about Quick Look is that, it’s extensible. There are quite a few plugins available, but are scattered on the web.

Here, we’ll look at five Quick Look plugins which make browsing code much easier.

Installing Quick Look plugins

The procedure is pretty simple, you just have to move the Quick Look plugin file to ~/Library/Quicklook/ and run qlmanage -r in terminal (that’ll reload QuickLook generators).


QL Color Code

Quick Look by default doesn’t do syntax highlighting for code. This plugin fixes it.

Syntax highlighting in Quicklook

It supports quite a lot of programming languages and you can choose between themes. For example, running defaults write org.n8gray.QLColorCode hlTheme ide-xcode will set the highlight theme to that of Xcode. You can find more defaults in the Readme.

Link: QLColorCode


QL Markdown

This is a must have if you use Markdown formatting for storing notes. The plugin even lets you change the styling – including fonts, margin, padding, and more, by letting you edit the style.css file.

Markdown formatting

It also works regardless of what extension you use for Markdown files – .md, .markdown, .mdown or whatever.

Link: QLMarkdown


QL Stephen

This one is a little tricky. There can be a lot of cases where the text file you want to view doesn’t have an extension at all. Best example is repositories on Github having a README file (or Makefile etc.).

This plugin lets you preview all of them.

Link: QLStephen


Better Zip

If you ever wanted to view what’s in a ZIP file without actually extracting it, this plugin is what you need.

Previewing ZIP files

Link: BetterZip 2

Now, for the fifth plugin – it’s not actually a plugin, but a small shell command.

defaults write QLEnableTextSelection -bool TRUE

This command makes the text in Quick Look selectable. While this may sound silly, this alone can be the smartest hack for making Quick Look better.

So that sums it up. Do you know any more ways to make Quick Look better on OS X? Put them in the comments.


Share your localhost with the world using ngrok

Working locally has huge advantages as compared to working on a remote server. You won’t have to go through the cycle of fetching files, editing them, and deploying.

But what if you want to share your localhost with people on a different network, without deploying it? That’s where ngrok comes in.


ngrok is a small command line utility which lets people on different network to access your localhost. It does this by creating a tunnel from one of its subdomain ( to your localhost.

To get started, head on to the site and download it. You’ll be getting a executable shell script which is the utility itself. (That’s on OS X/Linux, I’m not really sure about Windows.)


You’ll probably want to symlink it to /usr/local/bin/ngrok or a place where you generally keep shell scripts.

Now execute the script. The most basic usage is to just do ngrok 80 – which makes your localhost on port 80 available on ngrok’s subdomain.

There are quite a few options for the script, ngrok -subdomain mynewrockingapp 80 , for example, will create a tunnel to subdomain of your choice.

Creating a free account unlocks lot of cool features, like choosing a default subdomain, username/password for authentication and so on. You can also choose your own subdomain (, instead of ngrok’s.

ngrok also lets you debug HTTP requests and responses, and inspect traffic. You can access the interface at localhost:4040.

Link: ngrok


How to enable Facebook Public Profiles

Facebook Public Profiles, a very important feature specially for bloggers who want to show their Facebook profile on their website.   It’s a very nice and easy way to interact and stay connected with your blog’s readers. But we all know that nothing is easy on Facebook. If your public profile is disabled then it will show content unavailable page as shown below:

Facebook Public Profile Not Showing

Let’s tell you how to enable your Public Profile.

How to Enable Facebook Public Profiles?

For this you have to change two major settings in your Facebook account.

  1. Enable Public Search: First of all enable public search i.e. anyone can search you on Facebook and outside it. For this go to your Privacy Settings (Click Here) and click “Edit Settings” for “Ads, Apps and Websites”. Check the screenshot below:
    Now scroll down the page and click “Edit Settings” Button for “Public Search”. Now check the box “Enable Public Search”.
  2. Secondly go to your Privacy Settings (Click Here) again and click “Edit Settings” for “How You Connect”. Then select “Everyone” from the drop down list for “Who can look you up using the email address or phone number you provided?” and click done.

That’s it, now log out of Facebook and open your profile’s link; it will show your Public Profile. A highly recommended  suggestion to you is that you should always allow your blog readers or other Facebook users to subscribe to your public updates else there’s no use of a public profile. To allow subscribers subscribe to your profile simply check the “Allow Subscribers” box on this page.

Stay connected for more Facebook Tips. Happy Facebooking 🙂


Remove Sync.Me “cheap call” spam from your iPhone Contacts

Not so long time ago, I was a happy Sync.Me user. It was named SmartSync then and as far as I remember was among top application in Apple’s App Store.

Out of the blue in one of its update they added support for some VOIP-service. As they already had access to my iPhone contact-book, they without my permission added a “cheap call” URL-field to every contact in my iPhone. You can see it below:

Initially, I ignored it but it created issues during next sync. This “cheap call” link on next-sync got added to my Mac’s Contacts book (Address-book on old Mac OS version). From their it got synced to my Google Contacts!

When I tried contacting Sync.Me support, I did not get reply for 5-days. After that, their support team said that cheap-call feature is pulled so that I need to wait for few weeks after which they will add an option to remove cheap-call fields from my contacts!


AppleScript came to rescue

Sometime back I learned little-bit of AppleScript using it I first tried creating my own small AppleScript to clean this mess. When I stuck, I  started googling which lead me to amazing AppleScripts collection by Trevor.

I used Trevor’s Remove Emails for Label script and after some minor changes got it working to remove this “cheap call” spam from my contacts.

How-To Use This!

  1. Open Contacts Application on your Mac.
  2. Take a backup of your contacts. Use File >> Export >> Contacts Archive... option.
  3. Download this AppleScript file.
  4. You will see RemoveURLsByLabel.scpt file on your Mac. Just click it and it will open with AppleScript Editor application.
  5. Now, go to your Contact and select contacts from which you would like to remove “cheap call” field. You can select all contacts. Script will not make any changes to contacts which do not have “cheap call” field.
  6. After selecting one or more or all contacts, go to AppleScript Editor and click Run button.  
  7. The script will first remind you to backup your contacts, then it will prompt for URL label name. Default is “cheap call” which should work fine. For non-english users, if label name is something else, type/paste it there. 
  8. Just hit OK. Script will take some time to finish if you have large contact-book. At the end of it, you will see “cheap-call” spam gone!
  9. Sync your Mac contacts to iPhone. Feel free to run this script again, if this field re-appears because of syncing to some other resource.

What’s Next…

I have removed Sync.Me. They might add an option to remove it in future but I hate it when some app leaves its shit in my contact book. I removed this application for now.

I am now using iOS6’s built-in Facebook/Twitter Sync options. iOS6 sync’s less data as compared to Sync.Me but I am happy with less data rather than more spam in my contact book!

Github Link: AppleScript to remove cheap-call spam by Sync.Me


How to delete all Facebook messages at once

There is a huge list of features that are still missing on Facebook, and one of them is the power of deleting multiple messages at once. Some people don’t like keeping messages in their inbox but they have to as it’s a very difficult task to delete conversation one by one. Moreover there’s not just a single click procedure to delete a conversation, you have to follow a small procedure which is quite annoying when you have so many friends and conversations on Facebook. Let’s tell you a simple and a much faster way to delete multiple messages from your inbox.


To delete all messages from your inbox, you just have to install a simple extension to your Google Chrome. This extension is Facebook Fast Delete Messages. To add this extension to your Google Chrome Browser please click the extension’s permalink below and click “Add to Chrome”:

Now restart your browser and open Facebook inbox. You will see a red cross with each conversation. Click it to directly delete the message with a single click. You will also see a “Delete All” Button on the top of messages; click that button to delete all messages on that page with a single click. Check the screenshot below.

Are you still using Firefox?

Well don’t worry if you are not using Google chrome, we have a similar script for Firefox as well i.e. Message quick-delete buttons. Click the script and install it to Firefox-Greasemonkey.


Points to be noted!


Please note that

  1. Don’t forget to cross check whether your messages have deleted or not, sometimes when you delete messages with this Chrome extension and you refreshe the page, Facebook starts showing the deleted messages again. Always refresh the page after deleting and make sure that deleted messages are not there.
  2. I have personally tested and using Google Chrome Extension but never used the Firefox script. Hopefully that will work.
  3. We are always here for you, in case you are facing some difficulty please drop a comment below. 🙂

Stay connected for more Facebook tutorials.


PHP5.4, Imagemagick & Pecl Installation [Ubuntu]

After upgrading to PHP 5.4.x, by using source compilation method, I realised our PHP was missing imagemagick extension.

ImageMagick is replacement for php’s default GD library which WordPress uses for creating thumbnails on the fly. Using ImageMagick WordPress plugin, you can tell WordPress to use ImageMagick rather than PHP’s default GD library. But for this to work your PHP must have ImageMagick extension enabled.

Installing & Enabling ImageMagick using Pecl

You need install ImageMagick package first

apt-get install imagemagick libmagick9-dev php5-imagick

If you get error:

Package ‘libmagick9-dev’ has no installation candidate


apt-get install imagemagick libmagickwand-dev php5-imagick

Installation is just 1-command job (usually)

pecl install imagick

But at the time of writing this post, when running above command against php5.4.x, installation will fail with following error:

/tmp/pear/temp/imagick/imagick_class.c:9534:2: error: 'struct _php_core_globals' has no member named 'safe_mode'

By default, pecl attempt to install stable build of imagick which as of today is not ready for PHP5.4. But they already have RC build here –

To force, pecl to install RC build, run following command:

pear config-set preferred_state beta

Now you can attempt installation again:

pecl install imagick

This time it should work! You will see output like below:

 Build process completed successfully
 Installing '/opt/php5/lib/php/extensions/no-debug-non-zts-20100525/'
 Installing '/opt/php5/include/php/ext/imagick/php_imagick.h'
 Installing '/opt/php5/include/php/ext/imagick/php_imagick_shared.h'
 Installing '/opt/php5/include/php/ext/imagick/php_imagick_defs.h'
 install ok: channel://
 configuration option "php_ini" is not set to php.ini location
 You should add "" to php.ini

As suggested by last line, do not forget to add following line in php.ini

You may need to restart PHP-FPM or your web server.

service php5-fpm restart


Compiling ghostscript 8.71 from sources

In a recent project, where we are working on converting PDF based newspapers to interactive image slideshows, we came across an issue with ghostscript version 9.05. This version was breaking rendering of some Marathi fonts present in PDF.

When tested on ghostscript version 8.71, conversion was working properly. So we decided to downgrade ghostscript from version 9.05 to 8.71 on our server running Ubuntu 12.04 LS. Below are steps we followed.

Compiling ghostscript 8.71 from sources

Download sources from


Uncompress downloaded source code & change to directory.

tar xvf ghostscript-8.71.tar.gz
cd ghostscript-8.71

Configure it (I used all defaults)


Start compilation with


If you encounter following error:

./base/gp_unix.c:148:2: warning: implicit declaration of function ‘gettimeofday’ [-Wimplicit-function-declaration]
make: *** [obj/gp_unix.o] Error 1

Compile using


Finally install compiled binaries using

make install

At this point you will ghostscript will be installed at /usr/local/bin/gs

There are other methods to install old versions also, but compilation is safer alternative IMHO.

About the project:

rtCamp is working on an exciting project to connect WordPress with conventional newspaper publishing. The project is in early stages and a sample can be seen at (Note: you may see some text in images broken if you visit this on Aug 24 or Aug 25 as all images are recreated using ghostscript 8.71 right now)