Category: Blog

  • Testing localhost instances on devices using a proxy

    I wanted to be able to access my localhost from my iPhone. This article on Egalo told me how to do it. Essentially, you run a Proxy Server from your laptop and point your device at the proxy in the wifi settings. The article suggests using SquidMan as a proxy, largely because it is fairly easy…

  • Advanced GitHub issue filtering

    A little over a year ago, I posted about using dotjs to add buttons for advanced issue filtering on GitHub. With GitHub’s launch of their revamped Issues page, or dotjs code is no longer needed! Issue filtering is where it’s at: Example: all bugs that aren’t labeled as “help wanted” If you are looking at Twitter Bootstrap CSS issues,…

  • Discovering the events attached to elements in jQuery

    If you have a need to find what events are attached to an element in jQuery, here’s what you do: Finding events attached to the document: Finding events attached to an element with an ID of bacon: Here’s a snippet I’ve been using in the console:

  • Bringing back the console API on Netflix and Facebook

    Facebook and Netflix have implemented some code that breaks the console API in Chrome by changing the getter/setter for the console property on the window object. The purpose is noble – to help avoid a social engineering attack – but as a developer it irks me. I want my console when and where I want it.  In…

  • Setting /etc/hosts on an Android Emulator using a Mac

    Testing sites on mobile devices is a necessity. When you find a bug that needs some loving and you want to do the code tweaks on your localhost, the Android emulator balks. It doesn’t know anything about your localhost. Luckily, you can resolve this by editing the emulator’s /system/etc/hosts/ file. Here’s what to do: First,…

  • Activating BuddyPress for PHPUnit WordPress-tests

    I have found myself writing PHPUnit tests for WordPress plugins lately (using wordpress-tests) and the code that I’m working with has a dependency on BuddyPress.  Enabling BuddyPress for WordPress unit testing requires a bit of hoop jumping because you can’t use the wp_tests_options global variable as you would any other plugin in your local bootstrap…

  • Bypassing Output Buffering in PHP

    I’ve been developing with PHP for over a decade and I just love it when I learn a new trick. Perhaps you are working on a command line script and want some feedback, but you’re output buffering to generate a fancy report (or something).  You can bypass the output buffering with this little trick Result:…

  • Chromedriver doesn’t run in tmux and here’s how to fix it

    If you are attempting to run Selenium using the Chromedriver while in a tmux session, you may have encountered some issues with chromedriver.  Specifically, this error: Aw, Snap! Something went wrong while displaying this webpage. To continue, reload or go to another page. If you’re seeing this frequently, trie these suggestions. A simple solution is to…

  • Guild Wars 2 for the Mac Without Re-downloading the Whole Game

    Today, ArenaNet announced Guild Wars 2 for the Mac (beta).  As excited as I was for that announcement, I wasn’t looking forward to downloading the client all over again.  With some digging, I discovered that I could simply copy my GW2.dat file from my windows installation to the mac install.  Here’s how: Make your Windows client GW2.dat…

  • 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…

  • 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’…

  • 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…

  • Web Programming Guest Lecture: JavaScript

    by

    in

    I have once again given a JavaScript guest lecture to Zach‘s Web Programming class. This year I have taken the liberty of swiping some of Douglas Crockford’s “JavaScript: The Good Parts” presentation for the leading slides. Here’s the presentation: Javascript 2009 View more presentations from borkweb.

  • Star Wars: Death Troopers

    by

    in

    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…

  • 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…