OpenDNS – Providing A Safer And Faster Internet

opendns

OpenDNS protects millions of people a day across hundreds of thousands of schools, businesses and homes. It blocks phishing sites, gives you the power to filter out adult sites and proxies among more than 50 categories, and provide the precision to block individual domains.

Well, when I first heard about it, OpenDNS was a much smaller service. For three years I’ve been using its DNS service and I must admit, during all this time I never truly realized which benefits it was bringing me. But when I got a new computer, man, the difference became highly visible. You know, its hard to notice something when it never fails! With OpenDNS, you get faster domain name resolution, resulting in pages loading faster. You also get protection from phishing, autocorrection of address bar typos, and all sort of useful extra things you just wouldn’t expect from a DNS server, but which, after using once, you feel like those should have been a standard feature of DNS servers from the very beginning. 

To make use of the OpenDNS service, which is free, configure your system (computer, router, modem) to use the following dns servers:

208.67.222.222
208.67.220.220

For more information, be sure to visit http://opendns.com/ and the read the starter guide for new users.

Ah, e é claro, nem preciso dizer que o serviço oferecido pelo OpenDNS é especialmente útil para nós, usuários reféns da telefônica. Para quem o utilizava durante a pane geral no sistema da telefonica, teve seus sintomas bastante atenuados. Não apenas isso, mas a maioria dos bloqueios infames ocorridos no país, como o bloqueio nacional ao youtube, a ameaça de bloqueio ao wordpress, o misterioso bloqueio da telefonica ao google pages e outros tipos de acontecimentos ridículos também podem ser evitados utilizando-se este serviço gratuito.

Software Licenses’ Legal Notices

800px-Gpl_auto
When releasing software it is always good to release under a suitable license. Licensing policies were created to protect you and your code, restricting what others can do using your code, and not what you can do with your own code. The copyright holder (the author, e.g. you) is able to change licensing policies anytime, but, depending on the license you choose, only as long as every author and every person who has ever contributed to your project also agree.

Wikipedia offers a list of popular licenses and a comparison of free software licenses you can use in your projects. But no matter which one you choose, a common practice is to include a license notice header in all your source files to enforce the restrictions you have chosen. Here is a list of common headers for the most common available software licenses. Comparison between its different implications is beyond the scope of this post, but more information is available on the Additional Information section below.


GPL – GNU Public License (details)

LGPL – Lesser GNU Public License (details)

MPL – Mozilla Public License (details)

BSD License (details)

MIT License (details)

Apache License (details)

CC – Creative Commons (details)

Creative Commons licenses are not intended to apply to, and should not be used for software. I’ve included it here just to remember you.

Public Domain (details)

This is only a suggestion as there is no common sense on how to dedicate your work for the public domain. This excerpt was borrowed from the SQLite site, a popular software that is itself dedicated to the public domain.

WARNING: Please pay attention that the Public Domain Dedication is not a license. By using it, you do not simply carve out exceptions to your copyright; you grant your entire copyright to the public without condition. This grant is permanent and irreversible. You’ve been warned.


Additional Information


For a nice comparison of different licenses, implications and more useful information, please check:

Comparison of Source Code Licenses

Also, before blindly adopting the GPLv3, please be sure you have completely and correctly understood everything it says. For more info about the GPL and the GPLv2 vs GPLv3 debate, see:

The GPL for Dummies
The GPLv2 vs. GPLv3 Debate
What the kernel guys are and aren’t (and really should be) saying about GPLv3
The Dangers and Problems with GPLv3
The GPLv2 vs. GPLv3 Chart

Personally, I would rather go with the GPL v2 instead.

System.Windows.Forms.Textbox AppendLine

appendline

Ever wanted to append a new line of text to a TextBox, tried searching IntelliSense for a AppendLine method but just couldn’t find it?

With the following code, one can add the missing AppendLine(string text) method for appending a new line of text to a System.Windows.Forms.TextBox by using the new Extension Methods of C# 3.0

using System;
using System.Windows.Forms;

namespace cSouza.Utils.WinForms
{
   
public static class TextBoxExtender
    {
       
/// <summary>
        ///  Appends a new line of text to the current text of the TextBox.
        /// </summary>
        /// <param name="text">The text to append to the current contents of the TextBox</param>
       
public static void AppendLine(this TextBox textBox, String text)
        {
            if (textBox.Text.Length > 0)
                textBox.AppendText(Environment.NewLine)
;
            textBox.AppendText(text)
;
       
}

        /// <summary>
        ///  Inserts a new line to the current text of the TextBox.
        /// </summary>
        /// <param name="text">The text to append to the current contents of the TextBox</param>
       
public static void AppendLine(this TextBox textBox)
        {
            textBox.AppendText(Environment.NewLine)
;
       
}
    }
}

To use AppendLine() on a TextBox object, just add this class to your project and import its namespace. To do this, create a new empty class, copy and paste this code inside it and then import the cSouza.Utils.WinForms namespace (with the using directive) wherever needed. Feel free to change the namespace name to something else if you wish.

Once this class becomes reachable from your code, you’ll notice that AppendLine() will start showing up on IntelliSense right after you type in the name of a TextBox object, just like a standard method would.

For more information about the new Extension Methods of C# 3.0, you can read a nice article written by Vipul Patel on developer.com by clicking here.

Windows Shortcut HotKeys

images

The way Windows recognized hotkeys for shortcuts was always a mystery to me. Create a shortcut, put it on any folder, open its properties and define a hotkey for it. If you happen to have created it on your Desktop, then it should work. But if it was My Documents, then it probably wouldn’t. Now what if you delete your shortcut with the working hotkey? The hotkey will still work, and there will be no way to unregister it other than rebooting!

Well, googling around I found a little explanation about how Windows manages shortcuts (at least until XP, don’t know if it applies to Vista). This will be interesting for a new application I’m writing.


Windows Explorer looks in 4 places for hotkeys, which are read on startup. Hotkeys are stored in the shortcuts contained inside them or in any of its subdirectories. So a to have a valid hotkey the shortcut must be put inside any of the following folders:

%UserProfile%desktop
%AllUsersProfile%desktop
%UserProfile%Start Menu
%AllUsersProfile%Start Menu

Now that explains why rebooting solved the zombie hotkey issue. Interestingly, the place from where I adapted this text has a very useful utility to manage Windows shortcuts that is worth taking a look.

Enabling bash autocompletion on Debian

terminal


Open up a terminal, then type:

nano /etc/bash.bashrc

Now, search for the following commented lines (lines with a starting #)

# enable bash completion in interactive shells
#if [ -f /etc/bash_completion ]; then
#. /etc/bash_completion
#fi

And uncomment them like this:

# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi

Now whenever you want to install a package, for example, you need only type the first letters of the package in the apt-get install command line and then hit tab twice to list available packages starting with those letters.

e.g. Typing

apt-get ins<TAB>

will autocomplete to apt-get install. Now continue and type

apt-get install amar<TAB>

and a list with every package with “amar” in their name will be shown. In this example, it will probably list packages such as amaroK and amarok-engines.

I know this feature works with far more commands, however I can’t enumerate all of them because I just don’t know they all. If you think it may work in the context you are in, then it costs nothing to try and check it yourself. Sometimes you’ll be surprised!

Note to self: Never buy anything from LG again

20760


For the rest of my life I’m sticking with Pioneer. This ain’t the first and probably wont be the last optical drive from LG that gives me headaches in less than one year after I bought it. Apparently, this drive chokes reading some burned DVDs, even DVDs burned by itself, while other computers could read them without a hitch.

The internet is full of complaints for this drive, the GSA-H22N, and I remember well the experience I had working in a school full of computers with LG drives in the past also wasn’t exactly the most troubleless ever.

But the world is weird, isn’t it? Turns out the best writable CD media I’ve ever bought in my life was also branded by LG. For years I’ve used this media with my Pioneer 110D, the most fast, reliable, cool and affordable DVD±R burner I have ever bought.