A mixed bag of useful shortcuts and tips.

Comments (0)

Text manipulation

  • In some text editors (like Notepad++), holding the Alt key while selecting text will select a rectangle of text instead of lines.
  • Double-clicking text then dragging your mouse around will select words instead of characters. Not cool enough for you? Triple-click text to select paragraphs.
  • Delete entire words instead of letters by holding the Ctrl key while you press the backspace and delete buttons.
  • You can also move the cursor from word to word by holding the Ctrl key while you press the arrow keys.
  • Holding the shift key while moving the cursor with the arrow keys will select the text the cursor passes over. This can be used in combination with the previous tip.
  • Drag and drop selected text to move it from a field to another.

Web browsers

Most web browser shortcuts can be found on in the browsers’ documentation. Here are the links to the most popular ones:

Firefox | Chrome | Internet Explorer | Opera | Safari

Some interesting highlights:

  • Ctrl+Click on a link will open it in a new tab. You can also click links with the scroll button to achieve the same effect.
  • In most browsers, Ctrl+K will give the focus to the URL bar and Ctrl+L to the search box.
  • Ctrl+Shift+T will restore the last closed tab in most browsers.
  • Ctrl+Tab and Ctrl+Shift+Tab will navigate back and forth between open tabs. Ctrl+PgUp and Ctrl+PgDown do the same thing.

Windows

  • Ctrl+Shift+Esc shows the task manager. This is especially useful in Windows Vista and Windows 7 since it skips the full-screen menu page you see when you press Ctrl+Alt+Delete.

iPhone

  • To close a buggy application, hold the power button until you see the “Slide to power off” screen, then release it and hold the home button until it disappears.
  • To reset the device, hold the home and power buttons for a few seconds.
  • Double-tap the top bar in Safari to go back to the top of the page.

Different colors with PNG images in IE (fix)

Comments (0)

What?

When displaying PNG pictures in Internet Explorer or Safari, there is a color distortion with the images. If this will not cause any trouble with isolated pictures, it can ruin your design if you rely on superimposed images with the same background color.

Why?

The gamma correction data included in a PNG image is used by browsers to make sure the image looks good when it’s displayed on your screen. However, this so-called “correction” is not applied equally to all colors and images and thus two superimposed images can look different even if they use the same colors, effectively breaking the design in some browsers.

The full explanation can be found here.

How do I fix this?

The fix to this is to simply not include gamma correction data with the images when you save them.

In Photoshop CS4,when you Save For Web & Devices, uncheck the Convert to sRVB box before you save your image.

You can also achieve this with PNGCrush and TweakPNG.

Source 1, source 2

A good read about best programming practices.

Comments (0)

Even if programming classes show you how to write code and create programs, I found that they often forget to educate student on the importance of writing quality code. I found a lot of my classmates to write programs that are entirely functional but impossible to understand once you look behind the curtain.

Here is a Wikibooks page with links to programming standards and good practices for a few popular programming languages. If you don’t see why this is important to you, you might want to begin reading TheDailyWTF.

Fixing the “#1046: No database selected” error

Comments (1)

Here is the simple, quick fix to the “#1046: No database selected” error when importing a .sql file from a Wamp installation in phpMyAdmin.

Fix:

In phpMyAdmin, click the Export tab situated under Home instead of the one when you are viewing the database to export. This will allow you to export entire databases and not only the tables contained in it. This might not work for users of hosting sites such as Hostmonster or Hostgator, since they pick the database names for you.

Alternative fix:

  1. Create the database on your server and note down the name.
  2. Open your .sql file with a text editor. You might want to use something other than Notepad since it doesn’t recognize the line breaks.
  3. Insert the following line before your first CREATE TABLE command in your .sql file:
    USE yourdatabasename;

    Be careful to write in the right database name. Hostmonster users, for example, will have their username in front of their database name. Therefore, the products database is in fact named username_products.

  4. Save your .sql file and import it using the import tab in phpMyAdmin.

Source

Create a shortcut for a quick access to the Hosts file

Comments (0)

The HOSTS file is a quick and painless way to block websites that could harm your computer or show you an alternative meaning to “Lemon Party”. If you haven’t learned about it yet, here’s how it works.

Now let’s say you want to create a shortcut to the file so you can easily add new websites to it.

  1. First, create a shortcut to notepad.exe on your desktop (%windir%\system32\notepad.exe in Windows 7).
  2. Right-click the shortcut and select Properties
  3. If you use Windows Vista or 7, click Advanced…, check Run as an administrator and press Ok. We need administrator rights to edit the HOSTS file.
  4. In the Target field, add %windir%\system32\notepad.exe %windir%\System32\drivers\etc\hosts to the end of the shortcut. If you did it right, the shortcut path should be the following: %windir%\system32\notepad.exe %windir%\System32\drivers\etc\hosts

You might want to use an explicit name such as “Edit the hosts file” and place it in your Start menu in order to quickly find it with the Start menu search box.

Jpeg background not showing up in IE? Try this

Comments (0)

If you have a JPEG image from your graphic designer that refuses to display in Internet Explorer even after triple-checking the CSS and the markup, check if it’s formatted in CMYK instead of RGB. It’s a stupid little mistake, but it might take quite some time and a lot of cuss words before you figure out what’s wrong.

With Photoshop, select Image>Mode>RGB to fix this problem.

If that isn’t the problem, consider revisiting the code and make sure the image format used is supported by all browsers.

Rogers’ retention plans: woah. NOT!

Comments (0)

Since my cellphone contract was ending soon, I tought I could try to negotiate a better plan instead of switching to Fido’s appealing 25$ plan. I gave Rogers a call and told them I was not going to stay with them once my contract expires. Almost machinally, the customer support girl offered me a better plan that suited my needs and a price I couldn’t get anywhere else.

However, I had to get a 3-year contract in order to benefit from this offer. I am currently on my father’s account and need to go on my own, so this is a big no-no for me. I managed to negotiate this down to 2 years (which was still too much) before saying I’d think about it and call later. This morning, I called back and got rid of this little requirement.

Now I’ve got a great plan, no contract (I will take one when on my own to keep this plan) and a brand new unlocked iPhone I got for 550$ on eBay. The Rogers customer service, I must admit, has greatly improved and the telephonists have been very helpful, which is a breakthrough.

Here is the plan I had for 37$ a month (taxes included):

  • 150 minutes
  • Unlimited calls and texts with 5 people
  • Unlimited evenings nights and weekends from 9pm
  • That’s it!

And now, the much more down-to-earth plan I got for 25.48$:

  • 200 minutes
  • 500 text messages
  • Unlimited evenings and weekends from 6pm
  • Call display, which is something you need to pay for nowadays.
  • No contract

I hate to admit it, but I’m a satisfied Rogers customer. This time.

Morale of this story: haggle.

UPDATE (03/31/2010):

This was too good to be true. I received the cellphone bill today and they decided they would charge everything above. Looks like I will have to waste more time on the phone getting Rogers to play nice with me.

UPDATE: (04/07/2010):

I called Rogers and two friendly customer support people fixed the problem. They couldn’t credit the call display since I didn’t renew my contract, but at least I end up paying 10$ less at the end of every month. The least I can say is that their customer support people is very nice, a breakthrough in the field.

Adding keywords to Chrome bookmarks (à la Firefox)

Comments (0)

When you add keywords to your bookmark in Firefox, you can quickly access them with only a few letters. For example, if you assign “rtm” as a keyword to RememberTheMilk.com, you will automatically be redirected to this website when you type “rtm” in the URL bar.

In Chrome, this can be done quite easily too once you figure out how it’s done:

  1. Right click on the URL bar and select Edit search engines
  2. Click “Add”
  3. Fill in the information as for a normal bookmark.
  4. Type your URL in the URL field. The keyword field becomes your keyword.

We simply add a new search engine with no search parameters. From now on, the keyword you entered will direct you straight to the website. Wasn’t that simple?

5 ways to save money in 2010 (that are not taken from Yahoo! Finance)

Comments (0)

Every year, it’s the same thing. Yahoo!, About.com and others publish the same run-of-the-mill article with money-saving tips for the new year. However, we are geeks, and they forgot we have quite a few more ways to keep our account balance in the green.

Trade phones instead of buying them

For high-tech phone lovers, dealing with 3-year contracts and upgrade policies is routine work. However, constantly getting that 80$ plan in order to score a great price on a smartphone is not a smart decision. A great and cheap way to get new phones is to buy them from cellphone forums. Howard’s Forums and XDA-Developers both have trading boards for members. It’s a great spot to find a cheaper (and sometimes almost new) phone for a good price. In my case, I traded a shitty HTC Diamond for an absolutely awesome HTC Magic and it didn’t cost me a dime.

You can always sell the phone on eBay, as long as you don’t just let it there, collecting dust.

Crack your gadgets before you list them on eBay

Before you put your phone on eBay, crack it. A jailbroken/rooted/flashed phone always bring in more dough than a stock device. I was able to get ridiculous bids on older phones flashed with the latest Windows Mobile ROM. XDA-Developers is an excellent ressource for anyone wishing to hack their HTC phones.

Pictured above: loot

Pictured above: loot

Coupons exist online, too

As soon as you see a “coupon” or “voucher” field when you reach checkout, your first reflex should be to head at RetailMeNot to check if there is any coupon you could use. Dell has some pretty slick deals you can profit from simply by taking

Buy online …but you knew that

This one needs no explanation. If you don’t already know about eBay or Newegg, you shouldn’t be reading this.

Let your bank do the work

There’s a sweet thing some bank can do for you. In my case, 20$ + 5$ for every transaction I made with my debit card go in my savings account every friday. Since I can only withdraw from that saving account twice a month before being charged, it’s a great way to put some money aside without hassle.

Buying on Amazon without a credit card

Comments (0)

Let’s face it: many online store don’t give a donkey’s ass about Paypal. There rarely is any workaround when you don’t have a credit card at hand unless you get access to the Paypal Virtual Credit Card. For Amazon, there is a way to buy small items in case of emergency. I wouldn’t buy a HDTV that way, but it’s good for rare items under 20 bucks.

It’s called Mechanical Turk, and you will have to work for your money. Mechanical Turk is an Amazon hive mind website where you get paid pennies for giving a hand in all sorts of services from surveys to product categorizing. I am usually repelled by those survey filling websites, but getting paid in Amazon credit is a great advantage and it can help if you absolutely need that ONE adapter that isn’t on eBay for some reason. It’s also a great way to kill incurable boredom in a productive way.

I cannot claim I earned a lot, but it can be useful for the few of us that still won’t use their credit card online.