Skip to main content

Posts

Disable autoplaying videos in Chrome and Firefox

Chrome Open Chrome > Settings > Advanced > Privacy|Content Settings > Plug-Ins | Click To Play . OR In your address bar, copy and paste - chrome://chrome/settings/content . Scroll down until you reach the Plug-ins listing there. Here you need to switch from Run automatically to Click to play . Firefox Open FireFox. Type about:config into the address bar and hit Enter. If you receive a warning about modifying settings, click the I'll be careful, I promise button to proceed. In the search bar that appears at the top of the page, enter plugins.click_to_play . The configuration setting should appear on a single line. Right-click the configuration setting and select Toggle. The value column should change from false to true . Restart Firefox. Opera Go to Settings (Alt+P) page and search for " plug-ins ". From there select Click to play .

Automatically download subtitles using VLC

Latest version of VLC has a feature to download subtitles automatically using the file name or hash. It saves you the trouble to go through manually downloading the subtitle. It uses addon VLSub which requires VLC version 2.2 To use this feature click on View tab and select Download Subtitles . It will open VLSub addon with options to search for subtitles by file hash or file name. Choose either option and it will search opensubtitles.or g for subtitles. Choose your subtitle of choice depending on your file and clicking Download selection . It will download and save the subtitle in your current working directory. The default language is English but you can change it to other languages as well from the Show Config window.

Generate required CSS for your sprites

If you are a CSS developer then you'll love this tool. Sprite Cow is an open source and online web app that generates necessary CSS based on your sprites like background-position, width, height etc. The source is available on GitHub

Simple sprites editor

Piskel is a free and open source online sprite editor. I use it to quickly edit my sprites. Online version was bit slow and browser froze a lot. Offline version is fine. Because I was using Linux Mint 17, I was getting an error libudev.so.0 not found. I was able to solve it by running the command sed -i ' s/udev\.so\.0/udev.so.1/g ' nw

Top 10 Songs

I made a django app recently in a weekend. Its called Top 10 Songs . It retrieves top charts from all over the internet to determine top songs for the weekend. Visit the site @ www.top10songs.co.in The app is open source and code is available at GitHub

Create Free WiFi Hotspot in Windows 7

Windows 7 has the ability to create wireless hotspots that allow you to share your pc internet connection. You don't need any other software for this.  First Enable Internet Connection Sharing on the network you want to share from network and sharing center. Internet Connection Sharing Start cmd with Admin priviledges. Run cmd with CTRL+SHIFT+ENTER Run the following command "netsh wlan set hostednetwork mode=allow ssid="techdorm" key="techd0rm" keyUsage=persistent"   #Change ssid and key to your like. You should see "Microsoft Virtual Wifi Miniport Adaptor" when goto change adapter settings in Network and sharing center. Then run the following command in cmd "netsh wlan start hostednetwork". Now you should a WiFi network with ssid you choose above be able to connect to it. To stop the network you can simply run "netsh wlan stop hostednetwork"  I used to make hotspot using Virtual Router but started to...

How to connect windows laptop wifi to android mobile

You cannot use Windows inbuild ad-hoc network to share your laptop/desktop internet connection with your android mobile through WiFi. Android will not detect your WiFi network although there are methods to do so. There are some special soft wares which makes this task a breeze like Connectify, Virtual Router etc. Virtual Router is free and open-source program that can wirelessly share any internet connection (WiFi, LAN, Cable Modem, Dial-up, Cellular, etc.) with any WiFi device (Laptop, Smart Phone, iPod Touch, iPhone, Android Phone, Zune, Net-book, wireless printer, etc.) secured using WPA2. Go to Network and Sharing Center Change Adapter Settings Right click on the connection you want to share Select Sharing tab Check the "Allow other network users to connect through this computer's internet connection" Also, select your Home networking connection Start Virtual Router and enter desired Network Name and Password Choose the connection you just shared from ...

Get IMDB Rating For Your Movies in a Folder

I have made an app that reads the names of movies from files given to it and retrieves IMDB Ratings for each. It uses awesome http://www.omdbapi.com/ API to fetch data. [caption id="attachment_201" align="aligncenter" width="733"] Folder Movie Data[/caption] It was inspired originally from http://legaloslotr.github.com/mdb/ . MDB has to be installed to work but mine version need not be installed but files have to be dragged and dropped everytime. I will try to improve it more in future using newer HTML5 features like localstorage but it will take time. Give it a go at http://pumpndump.in/fmd Also give your valuable feedback and comments. Source code will also be published soon at Git Hub

Running django on apache with mod_wsgi in Ubuntu/Linux Mint

Django comes with a built in web server that should only be used in development. Integrating django and apache is a bit messy. Apart from Django and Apache itself, libapache2-mod-wsgi is needed to run django with apache2. There are four steps involved. Creating a wsgi file that enables wsgi handler . Creating a conf file in sites-available directory of apache Enabling the site and reloading apache configuration Adding a host entry that points to localhost for the site Detailed Steps First to create a mysite.wsgi file in any directory of your choice with following code [python] import os import sys sys.path = ['/var/www/mysite'] + sys.path # change the path to project directory os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' import django.core.handlers.wsgi.WSGIHandler() [/python] Then create mysite.conf file in /etc/apache2/sites-available directory and write following code [xml] <VirtualHost *.80> WSGIScriptAlias / /home/user/mys...

Setup connection for MDMA

MDMA is a mobile network monitoring application. It shows information such as QoS, detailed signal information. I like to use MDMA rather than Huawei dashboards. It’s lightweight and much faster than Huawei Dashboards. MDMA 1.1.0.0 requires you to have connection entry ‘ MDMA ’ by default otherwise you get an error. [caption id="attachment_95" align="aligncenter" width="470"] Cannot find phone book entry error[/caption] Setting up a connection entry for MDMA Go to Control Panel\Network and Internet\Network and Sharing Center [caption id="attachment_96" align="aligncenter" width="280"] Open Network & Sharing folder[/caption] Create a copy of existing connection. [caption id="attachment_97" align="aligncenter" width="411"] Create a copy of existing connection[/caption] Rename it to MDMA [caption id="attachment_98" align="aligncenter" width="416"] Renaming...

Disable join/part messages in HexChat/XChat

Join messages are very annoying while hanging out in IRC. Its best to disable them. [caption id="attachment_84" align="aligncenter" width="1056"] Annoying join messages in IRC channels[/caption] To do this just go to Settings | Preferences | Chatting | Advanced and Check the Hide join and part messages option as shown below. [caption id="attachment_85" align="aligncenter" width="693"] Check the Hide join and part messages[/caption] You can also set this for individual channels by right clicking on channel name and choosing Hide join/part messages from settings option. [caption id="attachment_86" align="aligncenter" width="477"] Applying for individual channels[/caption]

Proxy settings in Linux Mint 14

Linux Mint 14 has a Network Manager that allows to set proxy settings but unfortunately that do not get applied to system level. [caption id="attachment_71" align="aligncenter" width="555"] Setting Network Proxy Preference in Linux Mint[/caption] To configure apt follow the following steps Go to /etc/apt/apt.conf.d/ Create a file called “30proxy” using a text editor like vi Add the following lines Acquire::http::proxy “http://username:password@host:port/”; Acquire::https::proxy “http://username:password@host:port/”; Acquire::ftp::proxy “http://username:password@host:port/”; [caption id="attachment_75" align="aligncenter" width="665"] Configuring apt to use network proxy[/caption] To configure bash in order to use curl, wget etc behind proxy Add following line in ~/.bashrc export http_proxy=http://username:password@host:port/ export ftp_proxy=http://username:password@host:port/ Don't forget to replace username and pass...

Code Completion in Aptana Studio 3 for CodeIgniter 2

If you don't know code completion in Aptana Studio 3/ Eclipse for CodeIgniter 2 is very easy. Only thing required is to put following code in any new file in CodeIgniter project directory. It’s just a class in which all the codeigniter library clasees are initialized. You can even add support for custom classes by initializing it as shown. [php] <?php class _ { function _() { // any classes you want included in autocompletion $this->load = new CI_Loader(); $this->config = new CI_Config(); $this->email = new CI_Email(); $this->encrypt = new CI_Encrypt(); $this->pagination = new CI_Pagination; $this->session = new CI_Session(); $this->driver = new CI_Driver(); $this->benchmark = new CI_Benchmark(); $this->typography = new CI_Typography(); $this->form_validation = new CI_Form_validation(); $this->profiler = new CI_Profiler...

jQuery support in Aptana Studio 3

I use Aptana Studio primarily for web development. It has great support for languages like PHP and JavaScript. But the problem is that I mostly use jQuery rather than code in JavaScript and Aptana does not have good support / content assist from beginning. So we need to install ruble for jQuery library. Ruble is short for Ruby bundle and is a runtime environment that allows the extensibility of Aptana Studio's editors by using Ruby. To install the jQuery bundle follow the following steps: Navigate to Commands | Bundle Developement | Install Bundle. Select jQuery and click OK. Aptana will clone jQuery ruble from github. Include appropriate jQuery sdocml in Project Build Path from Project Properties. Include a VSDoc file for jQuery in your project. [caption id="attachment_47" align="aligncenter" width="1313"] Aptana fetching jquery ruble from GitHub[/caption] You must include appropriate version VSDoc for correct Content Assist. [caption id="attac...

flotjs labels on tooltips for categories plugin

I had been using awesome flot.js charting library on my results app . The charts were easy to generate and I included categories plugin to replace x-axis labels to words rather than integer values. But I faced some issues while enabling tooltips and having them display the labels rather than x coordinates. I checked up the source code. [caption id="attachment_35" align="aligncenter" width="646"] getAxes()??[/caption] plot.getAxes() method described in the documentation was giving me an undefined method error.I searched the docs, searched on Google, stackexchange etc.. but to no avail. Then I found solution thanks to firebug. I did a console.log() of the whole item object and began inspecting. I could see few objects that looked promising. Upon further inspection I found a way to map a value back to its label. [caption id="attachment_34" align="aligncenter" width="924"] Dumping entire item object in firebug[/caption] I foun...

How to split large mp3 files using mp3splt

If you have a  lengthy  or large MP3 file and you want to  split  it into files of smaller size or duration, You can easily do this using mp3splt. Mp3splt   is an utility to split mp3 and ogg vorbis digital audio files without the need of decoding. It can be used to split a file into no of tracks of fixed duration and size or specified  split points. It supports variable bit rate mp3 files, silent detection, splitting with local .XMCD, .CDDB or .CUE file splitpoints or from external servers like   tracktype.org . It copies the original files first and then generates new, smaller files during the process of splitting without altering the original file. It does not do any encoding or decoding so the splitting is very fast and lossless. Steps to follow Navigate to directory where you have downloaded mp3splt { if using portable version } . Run and execute mp3slpt using the command   mp3splt  . Specify the options according to which you wanna split. The basic syntax is   mp3splt [file path]...

hash passwords using MySQL inbuilt functions

I just realized that MySQL has inbuilt function for encrypting strings upon insertions and it can easily be accessed from phpMyAdmin. It has many other inbuilt functions as well. Previously I used to hash strings manually through PHP functions or used external sites whenever I was building some login system and needed some database records to test. I used to copy output of PHP’s md5/sha1 function and paste it into password field manually. All those instructors in screencasts from which I learned used to do it manually too. I just picked up from them.

Removing index.php from CodeIgniter installation

CodeIgniter by default routes URLs through index.php. It is a bad practise from SEO perspective and also makes URLs ugly. In order to remove index.php from CodeIgniter we need to create a .htaccess file in the root directory of CodeIgniter installation. First of all we need ensure that AllowOverride is On in order to .htaccess to work. Second we need to check mod_rewrite is installed and enabled. In the .htaccess file created above we need to write following rules. <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # PHP under mod_php5 <IfModule mod_php5.c>     RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> # PHP under fast-CGI or other <IfModule !mod_php5.c>     RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule> </IfModule> Note the difference between mod_php5 and fast-CGI RewriteRule. fastCGI rule has a ‘ ? ’ after index.php. ...