Posts marked with "Posts" in posts

Block a site on all browsers in Linux

This tutorial will help you to block a site in all browsers on Linux

Open Terminal (ALT+F2).

Type sudo -i in the input field as shown in the picture above.
Check the Run in terminal option.
Finally click Run button.
Type your password if necessary and press enter.
Then enter the following commands.

gedit /etc/hosts

... [READ MORE]

Jquery ExtAjax Plugin : Submit forms to external files using Jquery

Hi. You can’t submit a form to external file using Jquery Ajax. Finally I created a Jquery Plugin to solve this problem. I named it ExtAjax.
This Jquery Plugin will help you to submit a form to a external file without refreshing the page.

Requirements

1) Jquery Latest Version
2) extajax.js file

Here’s how the HTML file will look like:








form" action="http://yahoo.com/search" method="get">



... [READ MORE]

Google + going to host a hangout with Steven Spielberg and Joseph Gordon-Levitt

Steven Spielberg and Joseph Gordon-Levitt discuss about their new film LINCLON.

The hangout is Tomorrow, 14 September, 04:30 GMT+05:30.

Google Play presents: Steven Spielberg and Joseph Gordon-Levitt in their first ever Hangout On Air where they will be exclusively premiering the trailer for their upcoming movie, Lincoln. If you want to be one of the lucky fans to join the hangout please:

-Let us know how we can contact you here http://goo.gl/ApTvq
-Upload a short video to your YouTube channel with the #lincolnhangout tag explaining who you are, why you are interested in "Lincoln" and what you would like to ask Spielberg and Gordon-Levitt
-Reshare this G+ event

+Google Play will reach out to you if you’ve been selected to join.#lincolnhangout .

ABOUT THE MOVIE:

Steven Spielberg directs Joseph Gordon-Levitt in  "Lincoln," a revealing drama that focuses on the 16th President’s tumultuous final months in office. In a nation divided by war and the strong winds of change, Lincoln pursues a course of action designed to end the war, unite the country and abolish slavery. With the moral courage and fierce determination to succeed, his choices during this critical moment will change the fate of generations to come.
... [READ MORE]

Get extension of a file using PHP

This function will allow you to get a file’s extension in PHP.
function getExtension($fileName){
   $i = strrpos($fileName, ".");
   if (!$i) {
      return "";
   }
   $length = strlen($str) - $i;
   $extens = substr($str, $i+1, $length);
   return $extens;
}

For example you need to get a extension of the file photo.jpg. To get the extension type this code in your PHP file.

<span style="color: #660000;"><?php</span> <span style="color: #660000;">echo</span> getExtension<span style="color: #660000;">(</span>'<b><span style="color: #e06666;">photo.jpg</span></b>'<span style="color: #660000;">);</span> <span style="color: #660000;">?></span>

The above code will print out "jpg".

... [READ MORE]

How to remove an item from GRUB boot menu

When you upgrade from old Ubuntu to new Ubuntu. Your GRUB menu will contain more than one Ubuntu. To remove unwanted Ubuntu from GRUB you need to edit the GRUB configuration file.
Follow these steps.
Backup your GRUB configuration file which is in /boot/grub/grub.cfg which we will need if something goes wrong.
Open Terminal (Applications -> Accessories -> Terminal). You need to be the root. For that :

... [READ MORE]

How to Repair/Restore/Reinstall GRUB Using Ubuntu Live CD

GRUB is the default bootloader of Linux. It is installed on your Hard Disk, but it’s not accessible as a drive. GRUB is installed on your Hard Disk when you install a Linux Operating System.

Without GRUB, you can’t boot in to OSs. Windows, Mac and other OS have their own bootloader. Linux too have different bootloaders. GRUB, BURG are examples.

When you install Windows after you install Ubuntu, Windows replaces the GRUB in the Hard Disk to Windows’ boot loader which won’t identify Linux systems (Damn you Windows !). But, our GRUB detects every OS. So, it’s better to have GRUB over Windows Boot Loader.

... [READ MORE]

How to Stop your Blogger Blog from Redirecting to Country Domains

When you open your blog you will be redirected to the country based domain of your blog.
This will affect your blog badly. For Example:

  1. The social stats – or Facebook Likes, Google +1s and Tweet counts – for your blog stories may be diluted as the URLs for the same story become different from different visitors.
  2. You will have a similar problem if you are using an external commenting platform like Disqus or Facebook Comments.

To prevent this you need to add this code to your Template.
Go to Blogger -> Template -> EDIT HTML

... [READ MORE]

How to make a transparent background/selection on an image using GIMP

Open your image in GIMP.

Select the area you want to make transparent.Select the appropriate selection tool from the Tool window or the Tools – Selection Tools menu on the Layer window
I usually use the magic wand/fuzzy select (Select contiguous region) tool or the Select regions by color tool.

Click in the region you want selected.  Use shift-click to add more regions/colors.
Tip: It’s easier if you zoom in (View – Zoom menu) to see finer details of exactly what you’re selecting.

In the Layer window (the one showing your image), select Layer – Transparency – Add Alpha Channel.  If this is blanked out then it’s already done.  This makes sure your image can store transparency data.
Select Edit – Clear.  This makes the selection transparent.
Save the file.  

Note: If you save it as a PNG file, be sure to select the ‘Save colour values from transparent pixels’ option in the Save as PNG dialog box.
... [READ MORE]

The Subins Project

UPDATE - 2019

There are some posts on Subins. But, I never wrote detailed about “The Subins Project”. I don’t know why. So I’m writing this for archival purposes.

I lost the source code of “The Subins Project” because I accidentally formatted by whole drive back in 2013 during an installation of Windows XP (their installer is very bad !).

... [READ MORE]

Follow/Subscribe

Telegram 

Mastodon  Twitter

GitHub GitLab

Subdomains

Demos  Lab

Past

This blog was once on WordPress. Now a static site. See source code on

GitLab