Preparing a Site for SOPA Blackout with .htaccess

BorkWeb, like a number of other sites, will be going black this Wednesday as a protest to SOPA.  Legends of the Sun Pig has an excellent article on this exact topic.  Martin writes:

Google recommends using HTTP 503 “Service Unavailable” status codes. The 503 code indicates that the service (or page, or site) is temporarily unavailable, but that it is expected back again soon. This is better than using the 404 (not found), 302 ( moved temporarily), or 301 (moved permanently) codes, because it tells web crawlers that they should just come back and try again later.

Because I have no desire to manually make the cut-over to a SOPA Blackout .htaccess file at midnight (because I’m lazy), I took his .htaccess settings and made a modification to enable the settings for the tomorrow.  Here’s what I have:

<IfModule mod_rewrite.c>

# =====================
# SOPA Blackout
# =====================

# Set a custom error document for 503 errors
ErrorDocument 503 /503_sopa.html

# Cause all requests (except images) to generate a 503 error,
# which will produce the custom 503 error document
RewriteEngine on
RewriteBase /
RewriteCond %{ENV:REDIRECT_STATUS} !=503
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC]
RewriteCond %{REQUEST_URI} !robots\.txt$ [NC]
RewriteCond %{TIME_YEAR} ^2012
RewriteCond %{TIME_MON} ^01
RewriteCond %{TIME_DAY} ^18
RewriteRule ^ - [L,R=503]

# =====================
# NOT SOPA Blackout
# =====================

# My other rewrite magic goes here.
</IfModule>

Additionally, I’ve shamelessly stolen the php.net SOPA 503 page because it is awesome.

Vim Undo Magic

Ever have a time when you are happily editing a script in vim and you realize you made a mistake over the course of editing? Luckily, Vim supports back in time undos.

You want to go back 10 minutes?

:earlier 10m

You want to go forward in time by 5 seconds?

:later 5s

Sweet cuppin’ cakes that’s ballsy. Armed with this tool, you step forward and backwards in your undo/redo adventure, you make an accidental edit. Whoops. Now all the code you’ve edited in the 10 minutes that you rolled back with the handy-dandy <code>:earlier</code> command is gone…right?

Nope! Undo branching is where the real awesomeness of Vim shines. If you realize your mistake, you can find a list of undo branches like so:

:undolist

Which will show you something like this:

number changes when saved

3 3 08:59:35
4 2 09:00:13

To jump to one of those branches, you can type:

:undo 3 or :undo 4

I <3 Vim

(via Life Hacker)

Sites Not Reachable After Linode Restart

I have recently moved the majority of my sites over to my CentOS Linode VPS and I was experience some load issues that prevented me from gaining SSH access.  As such, I decided to restart my VPS.  After the restart, I found that my sites were not reachable…lame.

First, I checked the firewall found here:

/usr/bin/system-config-securitylevel-tui

So…the firewall was fine.  Next, I attempted to restart the network via:

/etc/init.d/network restart

I was surprised to receive the following error:

Bringing up interface eth0: Device eth0 has different MAC address than expected, ignoring. [FAILED]

Alrighty…bizarre.  So with the help of this article, I was able to determine that eth0′s MAC address:

/sbin/ifconfig eth0

was different than the MAC address found in:

/etc/sysconfig/network-scripts/ifcfg-eth0

A simple edit to the above file and a quick network restart solved my problem and brought my sites back up! w00t!

Star Wars: Death Troopers

Death Troopers, a novel by Joe Schreiber will be released on Tuesday (October 13, 2009) and takes place just before “A New Hope”. What is it? A Star Wars horror book. That is something that I didn’t expect to ever see. I’m interested enough that I just might read it. Here’s the plot:

When the Imperial prison barge Purge breaks down in a distant, uninhabited part of space, its only hope seems to lie with a Star Destroyer found drifting, derelict and seemingly abandoned. But when a boarding party is sent to scavenge for parts, only half of them come back — bringing with them a horrific disease so lethal that within hours, nearly all aboard the Purge will die. And death is only the beginning.

For aboard the Star Destroyer, amid its vast creaking emptiness that isn’t really empty at all, the dead are rising, soulless, unstoppable, and unspeakably hungry.

What is awesome is that there are a number of fans that have come up with trailers for the book. This post has a large number of them, but here’s my favorite.

Pretty creepy.

Heroes of Newerth: Patch 0.1.39 Released

Heroes of Newerth has released patch 0.1.39 that brings in 2 new heroes (I’ve updated my HoN/DotA equivalents post appropriately)!


Wretched Hag
Equivalent of the Queen of Pain in DotA

Succubus
Equivalent of the Bane Elemental in DotA

For those interested, the full changeset is as follows:

Version 0.1.39
————–

General:
- Added PSR and clan information to the in-game player stats screen
- Changed requirements for Remake vote to pass
* It now requires the total number of players minus 2 to vote yes. If less than 4 people are voting, it requires
* If more than 4 people are voting, (total players – 2) votes are required to pass. If more than 2 people are voting, (total players – 1) votes required. Otherwise, 100% required to pass.
- Restricted game data not relevant to a players’ team
* This will prevent map hacks from working in HoN
- Fixed several effects showing up through the fog of war
- Updated Portuguese translation

New heroes:
- Wretched Hag, based on DOTA’s Akasha, the Queen of Pain
- Succubus, based on DOTA’s Bane Elemental

General Gameplay:
- Added team-based skills, Demonic Fortification for Hellbourne and Fortification of Sol for Legion
* These skills are accessed by clicking on any team structure then clicking on the corresponding button in the info pane in the lower right of the screen
* These skills share a global cool down time. Anyone on the team may activate them, but then they go into cool down for everyone
* When used, these skills apply +9999 armor to all allied structures

Arachna:
- Slightly increased visual size of the Spiderling
- Fixed a bug causing Spider Sting to not hit stealth units if they go stealth before the projectile hits them

Behemoth:
- Fixed some issues with fissure not impacting properly on higher level terrain or impacting units standing near the behemoth

Magmus:
- Added more detailed cast effects to Eruption and modified the animation. It should now be clearer when Magmus starts this skill

Pebbles:
- Reworked Chuck, it should now deal its damage consistently
- Units affected by Chuck will now take double the damage from Stalagmites
- Chuck will no longer be greyed out when no valid units are nearby to throw
- Reworked Stalagmites to properly delay based on distance
- Stalagmites now has a 600 base cast range, to match its DOTA counter-part
* Enlarge still increases the range of this skill by 50/100/150, making the maximum range now 750, from 700

Pestilence:
- Fixed a bug causing Swarm to not hit stealth units if they go stealth before the projectile hits them

Swiftblade:
- Swift Slashes will no longer hit siege units or gadgets

Bug fixes:
- Fixed a missing icon for Kongor’s Cheese

Heroes of Newerth: DotA Hero Equivalents

hon_logo

As I’ve posted many times on this blog, I’m a huge fan of DotA (Defense of the Ancients). It is only right that I suddenly become enamored with Heroes of Newerth (HoN), a game by S2Games currently in beta that matches the functionality of DotA and adds a layer of awesomeness on top.

I’ve played a number of games so far and have found one of my biggest hurdles is re-learning the heroes in HoN. Luckily, many of the heroes are simply ports of DotA heroes but learning who is who is also a slow process. Here are heroes in HoN with their DotA equivalents:

Legion: Agility | Intelligence | Strength

Hellbourne: Agility | Intelligence | Strength

Legion Agility Heroes

Back To Quick Links

HoN Hero

DotA Hero


Night Hound
=
Stealth Assassin

Swiftblade
=
Juggernaut

Magebane
=
Anti-Mage

Moon Queen
=
Moon Rider (Luna)

Valkyrie
=
Priestess of The Moon (Mirana)

Wildsoul
=
Lone Druid (Syllabear)

Scout
= No Equivalent

Legion Intelligence Heroes

Back To Quick Links

HoN Hero

DotA Hero


Blacksmith
=
Ogre Magi

Thunderbringer
=
Lord of Olympia (Zeus)

Ophelia
=
Holy Knight (Chen)

Pollywog Priest
=
Rhasta

Pyromancer
=
Slayer (Lina Inverse)

Tempest
=
Enigma

Nymphora
= No Equivalent

Zephyr (Owlman)
= No Equivalent

Legion Strength Heroes

Back To Quick Links

HoN Hero

DotA Hero


Armadon
=
Bristleback

Behemoth
=
Earthshaker

Hammerstorm
=
Rogue Knight (Sven)

Jereziah
~=
Omniknight

Legionnaire
=
Axe

Pebbles
~=
Stone Giant (Tiny)

Keeper of the Forest
~=
Treant Protector

Predator
= No Equivalent

Hellbourne Agility Heroes

Back To Quick Links

HoN Hero

DotA Hero


Chronos
=
Faceless Void

Slither
=
Venomancer

Blood Hunter
=
Bloodseeker

Soulstealer
=
Shadow Fiend

Arachna
= No Equivalent

The Madman
= No Equivalent

The Dark Lady
= No Equivalent

Hellbourne Intelligence Heroes

Back To Quick Links

HoN Hero

DotA Hero


Defiler
=
Death Prophet (Krobelus)

Demented Shaman
=
Shadow Priest

Glacius
~=
Crystal Maiden

Hellbringer
~=
Warlock

Succubus
=
Bane Elemental

Torturer
~=
Tormented Soul (Leshrac)

Voodoo Jester
~=
Witch Doctor

Wretched Hag
=
Queen of Pain

Puppet Master
= No Equivalent

Hellbourne Strength Heroes

Back To Quick Links

HoN Hero

DotA Hero


Accursed
=
Lord of Avernus (Abaddon)

Devourer
=
Butcher (Pudge)

Magmus
=
Sand King

Pharaoh
=
Clockwerk Goblin

Pestilence
=
Slithereen Guard (Slardar)

Warbeast
=
Lycanthrope

Electrician
= No Equivalent

Kraken
= No Equivalent

Star Wars: The Old Republic E3 Trailer

Wow. Just wow. This cinematic trailer for Star Wars: The Old Republic looks awesome. Featured within the trailer are the Sith, Jedi, Bounty Hunter, and Soldier classes. I am seriously looking forward to this Massively Multi-player Online Game and have serious faith in Bioware‘s capabilities.

Literal Translation Music Videos

We all know that music videos can be quite abstract and often times downright weird…the connection to the lyrics are often a stretch. Well, the guys over at DustFilms have taken a few music videos and have changed the lyrics to describe what is happening in the video.

The result? Awesomeness! Check out one of my favorites by those guys:

DustFilms aren’t the only guys that are doing it though…there are some that try – many of them failing – but a few are worth while. Check out this Creed literal video translation (my favorite non-DustFilms video):

Racquetball Strategy Videos – Shawn Royster

I’ve played racquetball off and on for a few years now without the benefit of instruction, skill, or real athletic ability. But, I play for fun with a couple of guys from work and in a desperate effort to gain an upper hand, I have turned to my old pal the internet for a few tips. It was there that I found Shawn Royster’s videos at ExpertVillage.

This racquetball pro has approximately 30 short videos explaining strategy, body positioning, returns, training, etc that have surprisingly revealed everything that I do wrong while playing. I have a feeling I’ll be revisiting these videos time and time again as I strive to wtfpwn my friends.

Here’s his video titled: Racquetball Strategy: After Serve Positioning

Platypus Mascot: A Plymouth State April Fool’s Day

Yesterday (April Fool’s Day) I had a little fun and launched a prank on the entire Campus Community of Plymouth State University. The prank? PSU’s portal received a makeover in order to announce a change of the campus’ Mascot from Panther to noble Platypus due to trademark issues.  Results?  Awesome.

Before our users logged in, they were met with a happy Platypus:

A groovy platypus login

A groovy platypus login

Once logged in, the users’ eyes were attacked by custom header complete with Platypus and sun flare that read: “Announcing the new Plymouth State mascot!”

Announcing the new Plymouth State Mascot!

Announcing the new Plymouth State Mascot!

Oh, but it didn’t stop there. You can’t just change a campus’ mascot without some explanation, so forced into the top right of everyone’s layout was a nice portal channel to detail the mascot change.  It read as follows:

Plymouth State has been proud to display the Panther as the University Mascot for many years but effective June 1st, 2009 the Panther will be retired.

Why the new Mascot?

Due to recent trademark disputes, PSU has been asked to select a new symbol for the University. While the change may come as a shock to some, change is a great thing! The adoption of the new mascot is a refreshing and invigorating change that we hope will inspire the campus as the Panther does.

The selection process for the new mascot was a lengthy one where we reviewed over 75 animals that were submitted by the campus community in the recent poll sent out to all students! The top contenders were: Newt, Badger, Elk, Moose, Platypus and Narwhal.

After much discussion, we are excited to announce that the Noble Platypus will be the new mascot!

Why the Platypus?
platypusThere are many attributes of the Platypus that resonate well with Plymouth State ideals. The following were the deciding factors:

  1. Mammal: As we planned the transition from the Panther to the new mascot, the desire that the new animal remain mammalian in nature rang clear with the selection committee. The Platypus fits the bill! (Yes, that was a pun)
  2. Versatile: The Platypus is an extremely versatile mammal which represents Plymouth State’s versatility in it’s educational, athletic, and extra-curricular programs.
  3. Egg Laying Semi-Aquatic Monotreme: The fact that the Platypus is the only semi-aquatic monotreme that lays eggs truly makes it unique. Uniqueness is an attribute in our students that we prize greatly and believe each and every one of you stand out from the crowd.
  4. Venomous: Venom in ankle spurs. This is just an extra bonus.

A change like this cannot be complete without gauging user opinions, so a poll was put together that received almost 1200 votes in 24 hours!

myPlymouth April Fools Day Poll

myPlymouth April Fool's Day Poll

Various end offices received a number of calls from end users ranging from excitement that PSU played an April Fool’s Day prank to frustration that we were switching away from the Panther (those people obviously didn’t know it was the 1st). All in all, I would consider this a successful holiday!

Now…what should I do next year?

Passive Aggressive Notes

kindly direct your attention to point #5

So, I just stumbled onto Passive Aggressive Notes and have found myself reading post after post. The site has been around a long time but in my endless interweb meandering, I’ve failed to stumble onto it before.

For those of you that – like me – are unenlightened, here’s the site’s tagline: “Painfully polite and hilariously hostile writings from shared spaces the world over.”

And here’s a few samples of awesomeness:

southern comfort
untitled 07.02.08

Guest Lecture: JavaScript, Ajax & DOM Manipulation

Zach has asked me to give a JavaScript guest lecture in his Web Programming class. We’ll cover: JS basics, node manipulation, DOM traversal, AJAX, JavaScript libraries, and myPlymouth implementations of those topics. Here are the slides (get the .ppt here):

A few resources that are mentioned:

Note: this is an updated talk on the workshop I led two years ago

Art: Dark Jedi

I’ve had some free time recently so decided to whip out my Wacom Intuos 3 tablet and see what I could drum up. I had a few commissioned drawings waiting on the wings – all three were character drawings of members of the Dark Jedi Brotherhood. As usual I have uploaded them to my Deviant Art gallery but I like to blog them as well. Here goes:

Solus Gar, Mando Jedi

Solus Gar, Mando Jedi

From Left to Right: Solus Gar, Mando Jedi (With Helmet); Talos d’Tana; Anubis

Solus Gar, Mando Jedi (With Helmet)Talos d'TanaAnubis

There is an issue on Talos that need correcting, and something’s odd with the proportioning on Anubis. I’d like to think that I’d fix them…but I probably won’t :D Anyhow, I’m pleased enough with the coloring to post them here.