Axe Bombing – Take Out Your Dorm Enemies With Aerosol

July 22nd, 2009 Robert Kania No comments

http://www.shaunbrown.com/inventions.htm

Usually when my clothes come out of the dryer either they don’t smell good because the dryer sheets were bad or they were in there too long and got a burnt smell.  So I have always had to line the inside of my clothes with some form of deodorant to make them smell decent.  But recently I got some Axe spray.  When I did my laundry the other day I decided to put my shirts in the drawer like usual, but as soon as I finished I sprayed some Axe into the drawer and quickly closed it.  This got me thinking about “Axe Bombing.” I have frequently heard complaints, particularly by girls, that if sprayed way too much, like some guys tend to do, the Axe smells awful.  I have often had this experience when I was forced to take Gym class in High School.  The area surrounding the Axe sprayer smells putrid for a few minutes.  So what if you used it on enemies? If some guy in the dorm down the hall were annoying you, playing music too loud or smoking outside your dorm, you could take a Axe can and, assuming you knew how hard and which way it landed, you could have the Axe can erupt in their room, making the whole room smell like a can full of Axe.  I assume this would work if you threw it out the window at the sidewalk at that annoying guy smoking right below your window. I was browsing the web right before I posted this to see what other ideas have beenaxe bomb done with Axe, and low and behold, poeple have made Axe Bombs and shown videos on Youtube.  See below.

Youtube Videos:

http://www.youtube.com/watch?v=ZcYwbjVvj7I

http://www.youtube.com/watch?v=ng1TiaHevN8

How to Make that Annoying Guy with the Sub-woofer Shut-up

A while back I was having a discussion with a friend, who told me a story about a friend who we’ll call Fred.  Fred lived in a dorm like everyone else and just like everyone else, he had that annoying neighbor who always had his sub-woofer going with some kinda deep bass music.  Fred would try to fall asleep at night, at about 2 am like normal college students, but that darn sub-woofer still went on.  Fred finally got tired of this a few weeks into college and he was already starting to miss his home.  So the weekend he planned to leave to visit home, Fred borrowed a sub-woofer for his stereo (because Fred had thought about the annoyances his sub-woofer would cause dormmates before coming to college and not brought his) and found the resonating frequency of the dorm.  He then turn up the sub-woofer and his stereo to full volume and left for the weekend.  Alas, when he returned, he never heard that darn sub-woofer from his neighbor again.

[Update] And now you can buy axe toys:

axe_toys[1]

Categories: College Tags:
Your Ad Here

Shop the Internet – New Site Launched http://ShopThe.Net

July 21st, 2009 Robert Kania No comments

I have launched a new website called Shop the Internet.  It is intended to be a valuable resource to consumers as it provides multiple shopping resources all on one site including several major retailers such as Walmart, Amazon, Newegg, and Best Buy.

Categories: Web/Internet Tags:
Your Ad Here

Drupal Most Recent Poll Block Not Caching

July 21st, 2009 Robert Kania No comments

I was working on my new Drupal site, Shop the Internet, yesterday and I tried to insert a poll into a sidebar block that would ask the users which online shopping site did they prefer: Amazon, Bestbuy, Newegg, Target, or Walmart.  To test the poll I click Amazon and viola, it posted my vote.  Success!  Or so I thought…I was logged in to my admin panel in Firefox so I tried it in Internet Explorer.  When I refreshed the page, it said it was voted on and was showing the results.  So obviously the poll must have been more advanced than I thought, using IP address over cookies.  So again I tried it on Google Chrome and same thing.  Okay everything is fine.  So I go back to work with my site.  However after half an hour when my cache data was set to reset I decided to retest it and so I opened Internet Explorer and went to Shop the Internet…but now the poll was available to be voted on.  Of course I instantly realized this was because the caching of the poll was wrong, it was caching the poll and saving it as the cached version so that anyone who viewed it after I had voted on it would see the results only for another half an hour.  So I started my research on Google of course.

I searched for a bit, but no results and I was wondering if it were my fault that the poll was being cached.  But eventually I came upon a Drupal forum post http://drupal.org/node/523676 which gave a patch which is transcribed below:

diff -urp –strip-trailing-cr ../drupal-6.x-dev/modules/poll/poll.install ./modules/poll/poll.install
— ../drupal-6.x-dev/modules/poll/poll.install 2009-01-06 16:46:37.000000000 +0100
+++ ./modules/poll/poll.install 2009-07-18 22:29:37.000000000 +0200
@@ -130,3 +130,21 @@ function poll_schema() {
return $schema;
}

+/**
+ * @defgroup updates-6.x-extra Extra poll updates for 6.x
+ * @{
+ */
+
+/**
+ * Fix cache mode for “Most recent poll” block.
+ */
+function poll_update_6000() {
+ $ret = array();
+ $ret[] = update_sql(“UPDATE {blocks} SET cache = 2 WHERE module = ‘poll’ AND delta = ‘0′”);
+ return $ret;
+}
+
+/**
+ * @} End of “defgroup updates-6.x-extra”
+ * The next series of updates should start at 7000.
+ */
diff -urp –strip-trailing-cr ../drupal-6.x-dev/modules/poll/poll.module ./modules/poll/poll.module
— ../drupal-6.x-dev/modules/poll/poll.module 2008-12-18 16:46:20.000000000 +0100
+++ ./modules/poll/poll.module 2009-07-18 21:45:53.000000000 +0200
@@ -131,6 +131,7 @@ function poll_block($op = ‘list’, $delta
if (user_access(‘access content’)) {
if ($op == ‘list’) {
$blocks[0]['info'] = t(‘Most recent poll’);
+ $blocks[0]['cache'] = BLOCK_CACHE_PER_USER;
return $blocks;
}
else if ($op == ‘view’) {
@@ -776,6 +777,8 @@ function poll_cancel($form, &$form_state

// Subtract from the votes.
db_query(“UPDATE {poll_choices} SET chvotes = chvotes – 1 WHERE nid = %d AND chorder = %d”, $node->nid, $node->vote);
+
+ cache_clear_all();
}

/**

If this code looks strange to you you are not alone.  I was confused too.  I have patched files in linux before, but my webhost, Ixwebhosting, does not have access to ssh or the terminal in general so I was stuck.  This was an obvious bug and I could not fix it.  All I could find were links to how to convert a patch file to an exe on Windows, but first I have a linux server and also how would I have executed that anyway?  So I decided to do it the manual way, open the files and manually edit it.  Make sure you back up all original files before editing!

  1. First open  ./modules/poll/poll.install and go to line 130
    Find

    function poll_schema() {
       return $schema;
     }

    and add after it

    function poll_update_6000() {
      $ret = array();
      $ret[] = update_sql("UPDATE {blocks} SET cache = 2 WHERE module = 'poll' AND delta = '0'");
      return $ret;
    }
  2. Save and exit.  Next open  ./modules/poll/poll.module and go to line 131
    Find:

    if (user_access('access content')) {
         if ($op == 'list') {
           $blocks[0]['info'] = t('Most recent poll');
           return $blocks;
         }
         else if ($op == 'view') {

    and replace with:

    if (user_access('access content')) {
         if ($op == 'list') {
           $blocks[0]['info'] = t('Most recent poll');
          $blocks[0]['cache'] = BLOCK_CACHE_PER_USER;
           return $blocks;
         }
         else if ($op == 'view') {
  3. In the same file go to line 777
    Find:

    function poll_cancel($form, &$form_state) {
      $node = node_load($form['#nid']);
      global $user;
      if ($user->uid) {
        db_query('DELETE FROM {poll_votes} WHERE nid = %d and uid = %d', $node->nid, $user->uid);
      }
      else {
        db_query("DELETE FROM {poll_votes} WHERE nid = %d and hostname = '%s'", $node->nid, ip_address());
      }
      // Subtract from the votes.
      db_query("UPDATE {poll_choices} SET chvotes = chvotes - 1 WHERE nid = %d AND chorder = %d", $node->nid, $node->vote);
    }

    and replace with:

    function poll_cancel($form, &$form_state
    
       // Subtract from the votes.
       db_query("UPDATE {poll_choices} SET chvotes = chvotes - 1 WHERE nid = %d AND chorder = %d", $node->nid, $node->vote);
       cache_clear_all();
     }
  4. Save this file and upload.  Now the Poll block should work well.
ibed below:
Your Ad Here

Configuring a Router

June 4th, 2009 Robert Kania No comments

Considering I just got a new router yesterday that has Wireless N I thought I would post something about how to configure one since the first time I tried with a router a year ago it took me two hours to figure out how and just happened to because I randomly saw an IP Address among the many pages of an instruction PDF.

First, the CD almost never works for anything…I’ve tried multiple CDs for router configuration and DSL configuration alike, but none have worked and I have always had to turn to manual configuration which I find very useful to know.

1.  Connect the router like the instructions that came with the router say.  Assuming you have a DSL modem or other modem that does not have wireless means, this means you connect the telephone cable or other internet cable from the wall to the modem.  Then take an ethernet cable and connect the output on the modem to the input on the router.  Now for initial configuration attach an ethernet cable to the router and connect it to your computer (I’m assuming its a portable one since why else would you really need wifi).

2. Open up an internet browser and enter one of the following ip addresses, depending on your router brand, into the address bar.  You may need to try several different ones:

Router IP Address Username Password

3Com

http://192.168.1.1

admin

admin

D-Link

http://192.168.0.1

admin

*

Linksys

http://192.168.1.1

admin

admin

Microsoft Broadband

http://192.168.2.1

admin

admin

Netgear

http://192.168.0.1

admin

password

Trendnet

http://192.168.1.1

admin

admin

3. Enter the username and password from above into the respective fields, submit, and you should find yourself in the control panel.  If these passwords don’t work for your router you may need to try the different ones for you router at http://www.routerpasswords.com/

4. Often times there will be a wizard that you can follow that will guide you through the process of connecting to the internet/setting up wifi.  Now usually though if you have done what I said you will not be able to access the internet if you load a page because the internet is not set up correctly.  Depending on your router you need to go to internet or WAN admin panel.  On my Trendnet, the WAN option if under the first menu, but on my D-Link there is a separate internet menu.  Either way find a form that has a drop down menu that has options such as DHCP, PPPoE etc.  Once you have found this menu you need to play around with the different options if you have not chosen the wizard to figure this out for you.  This is a tedious part as depending on your ISP (Internet Service Provider) you may have any of these.  At college, Virginia Tech, I must use DHCP option with obtain IP address automatically, but at home with Juno DSL, I must use PPPoE and enter my username and password for the DSL.  That is the part that took me a good hour the first time I set up a router.  It is probably a better option to use the wizard, but manual may be neccessary.  If all went well, you should now be able to load a website.

5. Now for wireless.  Again depending on your router you may have to search around for the Wireless configuration page, but you will know you found it if one of the fields asks for Wireless Network Name/SSID and another asks for a security type of WPA/WEP.  Once you have found this, you can create a name for your wireless network.  As for security type, I highly suggest WPA, and WPA2 if possible.  You will then be asked to enter a passphrase for the network.  I suggest something very random so that neighbors will not be able to leech from you wireless network.  Save your settings and test if you can connect to the network.

Categories: Technology Tags:
Your Ad Here

VirtualBox

June 4th, 2009 Robert Kania No comments

A few months ago I got into using virtualization software, which as it suggests, allows you to virtualize operating systems. First I started with a program known as VMware, which proved decent, but was lacking in one thing that annoyed me, it could not virtualize graphics card drivers so trying to use Ubuntu through VMware was pointless if I could not have my lovely Compiz effects which I adore in Ubuntu. This being a tragedy, I could not continue much with VMware. However to my joy, a few weeks laterI discovered that the newst version of VirtualBox, made by Sun Microsystems (the same as who own Java), allowed using up to 128 Megabytes of Video Memory for virtualization, which means I can now happily use UBuntu with the amazing Compiz effects.  If you want more on compiz fusion effects please visit http://lifehacker.com/software/pretty-and-productive/power-up-your-linux-desktop-with-compiz-fusion-291002.php for a sampling.  VirtualBox can virtualize most Operating Systems except unfortunately Mac OSX (though since I don’t prefer Mac anyway it is okay).  For a list of Operating Systems that can be run through VirtualBOx please visit http://www.virtualbox.org/wiki/Guest_OSes.

Categories: Technology Tags: