How To: Shorten URL for emailing links

How To: Shorten URL for emailing links

With the rise of Javascript and other web based programing languages, links to certain webpages have grown downright unwieldy. Places like eBay, Amazon, and many online shopping programs are the worst cases. But these portals provide such a vast number of items that any flat file based system from the 90’s would require a team of people to update it 24 hours a day as prices change and stock comes and goes.

Enter a plethora of web sites that “shorten” a given URL and present it in a friendlier format.

Tinyurl is one of the oldest and most popular of such services. They even provide a link that can be dragged to the browser tool bar for on the fly URL shortening services.

For instance: http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2FHeroes-Season-2-Jack-Coleman%2Fdp%2FB001B7CNZ6%3Fpf%5Frd%5Fp%3D294635701%26pf%5Frd%5Fs%3Dright-5%26pf%5Frd%5Ft%3D101%26pf%5Frd%5Fi%3D507846%26pf%5Frd%5Fm%3DATVPDKIKX0DER%26pf%5Frd%5Fr%3D06WM4R0ZBZMYJDY834NZ&tag=ricktech-20&linkCode=ur2&camp=1789&creative=9325

Becomes: http://tinyurl.com/5gvb4j

Minilink.org does the same thing, and even has a tools page that has a tool bar Javascript link just like Tinyurl. This site has one huge advantage over TinyURL though. Their links include the server name to keep people from inadvertently visiting the seedy parts of the Internet.

Thus the above link becomes: http://lnk.nu/amazon.com/n4m.html

While not every URL needs to be shortened, there are plenty that do. These two tools will certainly help in cases when it is needed. Email, IM’s, forum postings, etc would all benefit.

How To: Speed up Web Surfing

How To: Speed up Web Surfing

We would all like to surf the Internet a little faster. Unluckily Web Browsers, Network speed, and computer speed all conspire to make surfing the web as slow as possible.

Luckily each browser has a couple of tweaks that can be used to make things go faster.

Firefox
Firefox actually has the most options to affect network speeds. So many in fact that not only does Mozilla have a page about it, there are several blogs about it. These are very easy to access, simply type: about:config in your address bar.

Change the following settings:

  • network.http.pipelining, change the value from 4 to 8.
  • network.dns.disableIPv6, change value to true
  • network.http.proxy.pipelining, change to true
  • If those feel like to much trouble, there is a Firefox plugin that helps: chromedit

    Internet Explorer

    This first tip is Vista specific and is untested by me. I’ve heard that it works extremely well though but just like all these other settings your mileage may vary. http://www.wisebread.com/quick-vista-hack-to-get-you-browsing-at-high-speed-again

    The second tip is a bit more general. Using regedit we change the default number of connections from two to a larger number. Keep in mind that this will not always be reliable as some larger sites will limit the number of connections on their side.

  • Go to Start -> Run
  • Type “regedit”
  • Go to the value: HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings
  • On right side check for these two values: MaxConnectionsPerServer MaxConnectionsPer1_0Server
  • If they’re not present: right-click on the white region of Regedit’s right-hand column, click New, and then click DWORD Value.
  • Type: MaxConnectionsPerServer and hit enter
  • Right Click again and add the value: MaxConnectionsPer1_0Server
  • On each value, MaxConnectionsPerServer and MaxConnectionsPer1_0Server, click on decimal and change the number from 2 (or 0) to something like 6 or 8
  • Close Regedit, start Internet Explorer and enjoy
  • Safari
    Speeding up Safari is a bit different then the other browsers. You are actually SLOWING the browser down. Safari has a setting that changes the delay on the browser from one second to a slower integer. In Terminal (with Safari closed) type: defaults write com.apple.Safari WebKitInitialTimedLayoutDelay 0.25

    The last number is time in seconds and can be anything between 0 and 1. So 0.34 or .81 are acceptable along with the more rounded 0.5 and 0.75.

    Another good hint is to clear the cache, favorites icons, addons, and removing the preference file. Macrumors put together a great page showing how to do that.

    Keep in mind that most of these will not drastically speed up your Internet, it’ll be a small but usually noticeable speed increase. Keeping your computer in top shape and virus free will also go a long ways towards helping speed up the your web surfing.

    How To: Budget Network Attached Raid 5 Fileserver, Part 3

    The server is up and running, the drives are formatted and now serving just under 750gb of Raid5 goodness. Since I have a mixed network of machines, Windows and Mac I need to make it will work with each of those. So we’re going to setup SMB. I could also setup NFS as it’s slightly faster and would add compatibility to Linux machines but it’s not needed in this case. And SMB is actually a more common need since most people run Windows.

    Again, counter intuitively I found it was best to setup users first before trying to setup the actual shares. There are two ways to do this. The easy way, or the secure way. If the NAS server is on a local home network, guest access may be the way to go. But I always suggest even in such cases to at least have basic security.Go to Access then Users and Groups. Type in the name of the first user and a password. Leave the User ID to default, it will increment automatically for every new user created. The next option, Primary Group has a drop down list of the standard Unix groups.      

    Users and Groups   

    The first user should be added to the admin group. Other groups can be staff and wheel. This will give the user maximum permissions to read and write files. Again for home use this is sufficient. Of course FreeNAS also has access to add LDAP and Active Directory authentication. Both of these are simple setups for any System Administrator.Since it’s first on the list, and there are more Windows users around, we’ll explore setting up SMB before NFS. Under Services go to CIFS/SMB. Click on the Shares Tab, then the Plus to add a new share. I simply called the name raid and put in a comment to note which raid it was. (In this case, raid because it’s the only one.) On the path option click on button with three dots. This brings up a filebrowser window, chose the raid directory that we’ve already setup and hit ok.  

    File Browser  

     As can be seen below the it automatically puts in /mnt/raid which is what we setup back in Part 2.  

    shares   

    Before clicking the OK button notice two options for increased security. Host Deny and Host Allow. Adding in specific IP addresses to the allow box and ALL for deny will greatly increase security for connections. Keep in mind if the IP address of the computer changes, for instance DHCP on the DSL/Cable router is reset this could cause connection problems later on. At this point, the server is ready to test. Mac OS X 10.5(Leopard) actually sees these connections automatically, even if sharing across SMB (under file sharing) is turned off. Mac OS X 10.4 (Tiger) will need to connect to the drive via the Connect to Server option. Windows can now be connected just like any other server. Vista Directions are here, and Windows XP is here

    FreeNAS is an incredibly powerful program. Even though it’s still only in Beta it seems like a very solid product and does RAID NAS very well. I’ve really enjoyed playing with it and want to give a big congratulations to the development team for a job well done.

    How To: Budget Network Attached Raid 5 Fileserver, Part 2

    How To: Budget Network Attached Raid 5 Fileserver, Part 2

    In Part One I talked about selecting the hardware and my thoughts behind the choices I made. It’s all been put together and the next step is to install an OS. For various reasons I decided to install FreeNAS which is based off of FreeBSD. It can be grabbed from here.

    After a few minutes of looking at FreeNAS I was really quite impressed with it. They’ve taken a quite hard and convoluted process, added menus and made quite easy to setup. Like FreeBSD in general it can feel picky about hardware. If you’re using some off the shelf no-name SATA RAID controller, the odds are it’s not going be supported. But a lot of the more popular and better quality models are supported. The FreeNAS website (and also the FreeBSD website,) are both a tiny bit hard to find information and support when first using it. Counter intuitively you need to click on the Wiki link first, then knowledge base, not the Support link to find Installation and Configuration documentation. Luckily the menus within FreeNAS are fairly self explanatory.

    The first step is of course to download the image. In my case I grabbed the live CD so that I could simple have the machine boot off of it and was good to go. Another option is to use a USB thumb drive to boot off of. I’m personally disinclined to use one as they stick out and get broken easily.A UNIX installer screen will come up and start probing and self configuring hardware in the machine. A FreeNAS graphic screen may come up, and eventually it’ll beep when ready. Hit the escape key and choose option 2 to get an IP address via DHCP. Make sure to hit “Yes” when it wants to choose a IPv6 address. That step messed me up the first time I saw it, but it’ll simply fail as most likely there is not an IPv6 server around. Most home routers have a DHCP server built in, but there may be some configuration needed so check the router’s documentation.

    Once the IP address has been discovered, type the address it gives you into a web browser to open up the FreeNAS configuration page. The default user name and password is admin:freenas, it’s highly suggest you change the password ASAP. Once everything is fully configured we’ll go ahead and change this. At this point the instructions proved useful.

    Step One is to add the physical disks. Under Disks Click on Management, then the + sign. This brings up the disk management screen:

    As can be seen the available disks are at the top. In this case ad0 is the 40gb IDE drive I’m going to eventually use as a boot disk. Per the instructions change the “Preformatted file system” option to “Software raid” (the other options in that article may not be available). In this case I have four SATA drives so each needs to be added individually. Hit the apply button and each drive is added.

    The next step is to create the raid partition. Go to Disks, Software RAID, then choose RAID5. Choose a RAID name it doesn’t matter what. For simplicity I used “server” put a check next to all the disks that are going to be part of the RAID then another on the “Format and Initialize” box. Hit OK, then once again “Apply”. Now sit back and wait. On this screen very little is going on. But on the RAID server itself messages will start popping up. Even better, they’re helpful!GEOM_RAD5: server: all(-1): re-sync in progress: 0.01% p:x ETA:232min (cause: store verify progess). After 232 minutes of waiting we then got this screen:

    As can be seen my four 250gb SATA drives have been built into a 715gb RAID5 Partition. It now needs to be formatted which is done in Disk, Format. Choose the RAID array, give it a name again, no hurt in using the same name again. We’ll format it out to UFS+ with GPT and Softupdates as the as the filesystem. The other options may work, but are not recommended by the FreeNAS team. Hit the format button and thirty seconds later the drive is ready to mount.

    The mounting screen is sort of confusing at this point. After all we’ve already created and formatted the RAID drive so it should be ready. But this physically mounts it so that it can actually be accessed.

    Under Disks, click on Mount Point. Pick the disk. Then choose “EFI GPT” under the partition menu. This menu was a bit confusing for me at first, and once again FreeNAS’s documentation left this step out. Reading it at first it seems option 1 was wanted as we’d setup UFS before. The filesystem stays UFS though, and the name can be what ever. I choose the simple “raid” moniker for simplicity. The last option could be a real life saver if the power ever goes out. “Enable foreground/background file system consistency check during boot process,” would run fsck and other filesystem utilities when the machine was powered back on. It might take longer to get the RAID back up, but could save problems in the long run.At this point we’re ready to start mounting the RAID and writing data to it. I’ll talk about doing that in the next article in this series, including troubleshooting and setting up Time Machine to back up to the RAID automatically.

    Part Three