Sangent

Archive for the 'Random Tutorials' Category

Navigate

submitted by Sang on 01.26.2006

If you have ever tried to send a large file through an instant messaging program, you know that the task is very difficult to successfully transfer the file the larger the file is. Here’s another way to transfer files…with BitTorrent.

Sender:

  1. Download µTorrent (direct link)
  2. After you download it (130 KB, so it won’t take long), open it. If I can recall correctly, there is no installing.
  3. Go to Options -> Preferences
  4. Click on the Network Options “tab”, and change the port number to something more memorable like 31337.
  5. Click on the Advanced Options tab inside the Settings window.
  6. Find bt.enable_tracker to true (you can change it back after you’re done).
  7. Click OK to close out of the Settings window
  8. Go to File -> Create New Torrent
  9. Click the Add file button or Add directory button to add files or add a folder.
  10. In the Trackers text box under Torrent Properties, type http://[your.ip.address]:[port number]/annount

    Change [your.ip.address] to your IP address. Change [port number] to the port number you chose back in step 4 (31337 is the one I chose).
  11. Under Others in the Create new .torrent window, make sure Start seeding is checked.
  12. Click the Create and save as button.
  13. Send your .torrent file to the friend.

Receiver:

  1. Download µTorrent (direct link)
  2. Go to File -> Add torrent and select the torrent file that your friend sent you.
  3. Download!

Posted in Random Tutorials  email this post email  submit comment »

submitted by Sang on 11.22.2005

PHP offers an alternative syntax for some of its control structures; namely, if, while, for, foreach, and switch. In each case, the basic form of the alternate syntax is to change the opening brace to a colon (:) and the closing brace to endif;, endwhile;, endfor;, endforeach;, or endswitch;, respectively.

<?php
if ($a == 5):
    echo "a equals 5";
    echo "…";
elseif ($a == 6):
    echo "a equals 6";
    echo "!!!";
else:
    echo "a is neither 5 nor 6";
endif;
?>

would be equivalent of

<?php
if ($a == 5)
{
    echo "a equals 5";
    echo "…";
}
elseif ($a == 6)
{
    echo "a equals 6";
    echo "!!!";
}
else
{
    echo "a is neither 5 nor 6";
}
?>

Much better if you ask me.


Posted in Life, Random Tutorials  email this post email  4 comments »

submitted by Sang on 10.13.2005

If you use Adsense and you have high returning visitors, then you may notice that your CRT will decrease since your visitors will become blind to your ads (ad blindness). One way to overcome this is to rotate your ads with Google. In your Adsense control panel, click on the Adsense for Content tab. Then scroll down to the Color palettes section. In the list box, hold down the Control (Ctrl) key to select up to 4 color:

Adsense color palette


Posted in Random Tutorials  email this post email  submit comment »

submitted by Sang on 10.9.2005

Everyone is different, so you might not like these bookmarklets as much as I, but if you happen to like one of them, then digg it.

2 of the 3 screenshots can be enlarged.

So what is a bookmarklet?
It’s just a little JavaScript code that is bookmarked in your web browser. It’s usually in a form of a link that can be drag and dropped into your Bookmarks Toolbar. Once “installed,” they can enhance a page and make your life so much better.

How do I install (Firefox)?
I used to have so much trouble with this way back when, but it’s really simple. Once you find a bookmarklet (remember, they’re basically javascript links, so look in your Status Bar), drag and drop the link into your Bookmarks Toolbar. Follow these steps if you’re using Firefox:

  1. Go to View -> Toolbars -> Bookmarks Toolbars:
    bookmarks toolbar
    Make sure Bookmarks Toolbars is checked.
  2. Drag and drop bookmarklets to Bookmarks Toolbar:
    bookmarks toolbar
  3. Whenever you want to use a bookmarklet, just click on them. If you have too many like me, just to go Bookmarks -> Bookmarks Toolbar Folder -> [bookmarket]

How do I install (Internet Explorer)?

  1. Right click on a bookmarklet link
  2. Click Add to Favorites
    Add to favorites

The Bookmarklets

  1. Strip DirIEMozillaNetscape?Opera?
    Strips the page that you’re viewing. Useful if you want to view its media files without going through the source. I use this when I’m surfing for flash games for my site.
  2. post to del.icio.usIEMozillaNetscape?Opera?
    If you ever find a site that you like, click this bookmarklet, and it’ll post to del.icio.us
  3. domain ownerIEMozillaNetscapeOpera
    I got all these bookmarklets from Jesse’s site (except for the first two), but his domain owner bookmarklet didn’t work for me, so I edited it to make it work. :)
  4. remove redirectsIEMozillaNetscapeOpera
    If you hate being redirected for no good reason, this is for you.
  5. remember passwordMozilla
    I remember seeing a Firefox plugin that would make sites remember passwords (Gmail). Well, this is much better because you don’t have to install anything…and it works.
  6. validate htmlIEMozillaNetscapeOpera
    Don’t need to download the Web Developer Firefox plugin just to validate a page. Just add this bookmarklet to your browser instead.
  7. filter=0IEMozillaNetscape
    Changes a Google search to remove the limit of 2 URLs per site.
  8. make linkIEMozillaNetscapeOpera
    Takes the page’s title and URL and creates a link to that page…all in a new window. Useful if you’re lazy when writing HTML.
  9. invert lightnessMozilla
    Inverts a site’s colors (not including images). Why? You tell me.
    Works best on a site with few images.

Posted in Random Tutorials  email this post email  submit comment »

submitted by Sang on 07.13.2005

For my first tutorial, I’ll show you how to get rid of annoying advertisements on the Internet. You know, ads that blink incessantly telling you that you won something when what you really won is that knowledge that ads are annoying.

  1. Download Firefox
    This is the hard part for some people, but all you need to do in this step is to download a 4.7 MB browser. Here is the link: http://download.mozilla.org/?product=firefox-1.0.5&os=win&lang=en-US

  2. Install Firefox
    Installation should be a snap. Just click the button “Next” at the bottom if you want to get the default features. By the way, since Firefox is open-source, it contains no spywares or any other crap that has the potential of killing your computer. It actually does quite the opposite — protecting you from spyware.

  3. Nuke Anything
    Nuke Anything is actually a name of a Firefox extension (mini-programs that enhances your browsing experience) that will kill the ads. Go here to install Nuke Anything. Screenshot:
    Nuke Anything

  4. Restart Firefox
    This is an easy step. Close Firefox and open it again.

  5. Kill Ads
    You are now ready to kill ads. Now, find an ad that you don’t like on the Internet, right click on it, and select “Remove this object”. Here’s a screenshot. Click on it to see the full-sized version:
    Remove this object


Posted in Links, Random Tutorials  email this post email  6 comments »

Navigate blog