<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>shallop.com</title> <atom:link href="http://shallop.com/feed/" rel="self" type="application/rss+xml" /><link>http://shallop.com</link> <description>Striving for Zero State Because Entropy Requires No Maintenance</description> <lastBuildDate>Sun, 13 Jan 2013 00:04:33 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <item><title>The 10 Worst Things about World of Warcraft &#8211; Mists of Pandaria</title><link>http://shallop.com/2013/01/the-10-worst-things-about-world-of-warcraft-mists-of-pandaria/</link> <comments>http://shallop.com/2013/01/the-10-worst-things-about-world-of-warcraft-mists-of-pandaria/#comments</comments> <pubDate>Sat, 12 Jan 2013 19:04:54 +0000</pubDate> <dc:creator>Micheal Shallop</dc:creator> <category><![CDATA[Gaming]]></category> <category><![CDATA[absurd]]></category> <category><![CDATA[bc]]></category> <category><![CDATA[blizzard]]></category> <category><![CDATA[cataclysm]]></category> <category><![CDATA[cycle]]></category> <category><![CDATA[design]]></category> <category><![CDATA[disbelief]]></category> <category><![CDATA[fun]]></category> <category><![CDATA[game]]></category> <category><![CDATA[mists]]></category> <category><![CDATA[mop]]></category> <category><![CDATA[pandaria]]></category> <category><![CDATA[release]]></category> <category><![CDATA[software]]></category> <category><![CDATA[suspension]]></category> <category><![CDATA[vanilla]]></category> <category><![CDATA[warcraft]]></category> <category><![CDATA[world]]></category> <category><![CDATA[wow]]></category> <guid
isPermaLink="false">http://shallop.com/?p=614</guid> <description><![CDATA[I&#8217;ve been playing WoW since vanilla version starting in 2006.  Except for a six-month hiatus in late 2011, I&#8217;ve been a daily player.  I&#8217;ve seen multiple patches come and go, some good, most not-so-good.  Still, through it all, Blizzard manages to keep getting my $15 bucks every month because the game is fun. That doesn&#8217;t [...]]]></description> <content:encoded><![CDATA[<img
style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=ab05b85b6786c70c1e1db98e219f015f&amp;default=http://www.shallop.com/wp-content/uploads/avatar_2868.jpg' alt='No Gravatar' width=40 height=40/><p><img
class="alignleft size-medium wp-image-615" style="border: 1px solid black; margin: 5px;" alt="panda" src="http://shallop.com/wp-content/uploads/2013/01/panda-300x199.jpeg" width="300" height="199" /></p><p>I&#8217;ve been playing WoW since vanilla version starting in 2006.  Except for a six-month hiatus in late 2011, I&#8217;ve been a daily player.  I&#8217;ve seen multiple patches come and go, some good, most not-so-good.  Still, through it all, Blizzard manages to keep getting my $15 bucks every month because the game is fun.</p><p>That doesn&#8217;t mean that there aren&#8217;t elements in the game which, quite frankly, suck.  And I don&#8217;t mean suck as in &#8220;accidently suck&#8221; &#8211; but rather elements of the game that are intentionally designed to suck.</p><p>Video games, movies, books, and any other form of virtual entertainment is meant to do one thing &#8211; and that&#8217;s engage the user in a level of mental awareness commonly termed &#8220;suspension of disbelief&#8221;.</p><p>This mean that, if the media is designed properly, you become so completely immersed in the experience that you literally suspend disbelief and completely lose yourself in the experience.  This is best evidenced by watching a wide screen DVD &#8211; you know, the one that projects the image onto your T.V. with the lost real-estate manifested as the black bands across the top and bottom of the screen.</p><p>Once the movie starts, and you get into it, you stop noticing these areas because your brain is completely focused on the presented images.  You&#8217;ve immersed yourself in to the story line so deeply that you don&#8217;t even notice the television anymore.  Your brain shifts processing over to the right side and your creative half takes control of your brain locking out concrete concepts such as time and any sensory input that would serve as a distraction to what has currently commanded your focus.</p><p>This is successful suspension of disbelief and, over the years, has become my benchmark for determining the quality of an experience of whatever it is I am engaged in, be it reading a book, watching a movie, or playing WoW.</p><p>WoW has several features of in-game design which, when encountered, brutally haul me out of right-brain bliss and rudely deposit me into the left-brained land of &#8220;lol&#8230;wut?&#8221;.  I am jerked completely out of the game experience and my logical left side starts to pick-apart the game, gleefully exposing the stupidity.</p><p>After playing MoP for a while, I realized that my internalized &#8220;List of Design Atrocities&#8221; had changed very little.  And in a fit of ranting-driven in-game rage-play, I present them to you.</p><ol><li>NPC&#8217;s and Pets &#8211; There are several quests in Pandaria where you have some NPC tagging along on your quest.  The NPC helps you by providing advice,  bashing mobs or healing.  The general intent is to make it easier for you to complete whatever quest it is that you&#8217;ve been sent out to accomplish.<p>In the case of pets, (I&#8217;m talking about you, hunters, mages, and &#8216;locks!), the pets serve to protect and enhance your character&#8217;s abilities by shoring up weak spots and generally increasing overall chances of survival.</p><p>Where Blizzard fails in game-design with this concept is that the NPC or pet rapidly becomes so irritating, through it&#8217;s programmed actions of inept movement and self-placement,  that you start dreaming about a fireball to the face and leaving their smoking husk on the side of the trail.  Then, maybe, you can actually get stuff done.All pets and NPCs share this same obnoxious trait &#8211; they dance around you constantly, getting in the way of whatever it is your trying to do.  Want to loot a corpse?  You move your mouse to right-click the corpse and suddenly your pet has danced-in between your mouse pointer in the body.  Need something boss?</p><p>Trying to select your next target?  (You know, because tab-targeting is MUCH better in Panda&#8230;) Click the targeted mob and somehow you end-up opening an NPC dialog box.  In combat.</p><p>Got into a tight spot?  No worries &#8211; your pet/NPC will be there with you.  Right on top of you.  And slightly behind you.  Obscuring you.  Need to look at some key detail?  How about a nice view of the back of the NPC&#8217;s head, instead?</p><p>One would think that, after so many years of development, Blizzard would have perfected the algorithms of NPC placement and kept these sub-characters from distracting you from accomplishing your goals.  Nope.  NPCs/pets are perfect in that they&#8217;re always placed at the wrong spot at the wrong time providing a never-ending distraction.  Why they have to wander around behind you, instead of healing like a good dog, really generates unnecessary frustration.</p><p>Oh, and before I forget, please add a STFU option to the mage&#8217;s water elemental.  And an option to auto-disable growl in parties and raids.</li><li>Crafturbating (Usefulness) &#8211; I have to admit, I was pretty excited when I first saw the crafting options for MoP.<p>Because, innocently, I thought that I would finally be able to craft wearable that I can actually use.  And, by use, I mean: equip.  As in: not melt for chant-mats or pimp-out on the auction house.</p><p>Within an hour of exploring Pandaria, however, I quickly learned that crafting has remained pretty much an exercise in generating matts for enchanters to melt.</p><p>To be fair, I&#8217;m talking about crafting items at the higher levels &#8211; starting MoP at level 85 with max&#8217;d crafting skill.  By the time you&#8217;ve accumulated the mats necessary to craft an armor item, you&#8217;ve already be awarded a similar item of higher-value through questing.  And the loot you get from 5-man instances surpasses even that.</p><p>You end-up with countless hours spent gathering materials to make some item that will bump your crafting skill only to find that the item you&#8217;ve made is either already useless or will become useless very quickly because of better items that are showered upon you in-game.  This is why Darkmoon Faire is so popular &#8211; I can bump-up five crafting points in a profession without having to make anything useless.As a design flaw, Blizzard actually made crafting even more useless with MoP because now quest reward gear is tuned to your character for most cases.  No longer does my warrior have to act all gracious when receiving a cloth-belt for completing some quest as he only accepts plate now.  While I applaud Blizzard for implementing this long-desired feature, it actually detracts from the game because of the ridiculous frequency (in both quantity and value) of items makes almost everything you can craft worthless.</p><p>Items that are really high-end, and we&#8217;re talking blue level-450 stuff, is pretty much made worthless because by the time you&#8217;ve accumulated the matts necessary to craft the item, because your character has already gotten a comparable piece of gear that&#8217;s significantly better through instancing or raiding.</p><p>From a design perspective, this is an absurdly easy fix.  Crafting high-end items should bequeath the same traits as that of heirloom gear &#8211; that the crafted gear improves with your character so that the act of crafting something actually adds value to the game as well as providing visual recognition of your character&#8217;s achievement.</li><li>Crafturbating (Absurdity) &#8211; This has been a long standing gripe of mine.  Outside of enchanters, who can magically melt stuff decomposing items into materials used for enchanting, no other profession apparently is smart enough to allow the character the ability to un-make something they have crafted.<p>Tailors cannot salvage cloth, blacksmiths are too derp to figure-out how to melt down and re-use armor, engineers are brilliant at putting together marvelous items but are clueless when it comes to reverse engineering.</p><p>This makes absolutely no sense whatsoever.  My engineer puts something together and the game tells me I am too stupid to take it apart?</p><p>Every time one of my characters has to sell a piece of crafted gear that they themselves made, I am suddenly wondering what the point was of crafting it in the first place.  I mean, I spent 400g worth of materials to make the damn thing and my only option for efficient disposal is some vendor who &#8220;generously&#8221; offers me 19g for the item.</p><p>Apparently my character is also derp in the mercantile arts.</li><li>Runecrafting &#8211; I love my death knights!  OP to the max and capable of withstanding punishment normally only found in public school teachers or college bar-tenders.<p>Blizzard introduced the concept of Runecrafting when they introduced death knights into the game.</p><p>And then did absolutely nothing with it.</p><p>And successfully continued this trend of ignoring rune-crafting across multiple patches and up to the MoP release.</p><p>This dk skill has so much potential and it&#8217;s really a sad shame that it has been neglected for so long.</li><li>Talent Trees &#8211; with every new release, and every major patch, all characters wait to see not when, but how hard, they will be smacked with the nerf hammer.  (Nerf hammer.  It&#8217;s a fail that you even had to introduce this concept, Blizzard.  See rant-point 9.)<p>Every class has three talent trees available to them and there&#8217;s a plethora of web sites that will quickly school you in the &#8220;best&#8221; talent tree to take for your character.  Every patch and release requires, no, demands that you re-spec your toon should you want to enjoy comparable levels of play with other classes.  Who also re-spec&#8217;d.</p><p>Druids who were renown healers in WotLK suddenly all became tanks in Caty and then boomkins in MoP.  Just to be a member of the &#8220;best&#8221; sub-class.This, in itself incomprehensible, has become the accepted status-quo for WoW and everyone is pretty much ok with the inevitable &#8220;guess I have to re-spec and re-gear my toon&#8221; shuffle thrust down our collective throats with every software upgrade.</p><p>I call &#8220;shenanigans&#8221;.</p><p>Rift beats the pants off of Blizzard in this this aspect of the game.  Rift too offers a choice of three different specializations within a character class.  (Cleric tanks rule!)  But Rift succeeded where Blizzard failed simply in that Rift did not penalize your ability to succeed at the game by choosing one talent specialization over another.  All talent specs are playable to the same degree!</p><p>Mind blowing concept, isn&#8217;t it?</p><p>In MoP, for example, I had to re-spec my beloved pally tank to ret because I just couldn&#8217;t take the time required to bash down mobs in a PvE encounter.  I mean, sure, it&#8217;s great that I could whack down 2-5 mobs at a time, with complete confidence in my survivability.  But it just takes freaking forever.  Shield!  Block!  Gentle poke with pointy stick.  Parry!  Dodge!  Tap with mace.</p><p>It&#8217;s significantly more time-efficient to re-spec my pally as ret and re-gear, than to grind through the PvE aspect of the game.  The net effect being that I no longer have the same sense of affinity for my character. W00t.  Fun.</p><p>Why should the survivability of my mage be dependent of the specification I&#8217;ve chosen?  To me, mages are all about fire-blasting and face melting.  Why should I have to re-spec to arcane in one release, re-spec to frost in another, and then fire in a third, just to keep my dps comparable with other classes or even within my own talent tree?</p><p>Ridiculous.</li><li>Fishing &#8211; Blizzard has been unable, despite some improvements, to make fishing suck less.<p>Next to travelling, fishing is probably the biggest time waster in the game.  I am seriously considering hiring one the neighborhood kids to come over and mindlessly click-fish for my toon while I&#8217;m playing Xbox just so I don&#8217;t have to experience the pain of fishing.</p><p>Blizzard actually improved the suck-level of fishing with the MoP release with deeper integration into  MoP requirements.  Cooking now heavily relies on fishing; you cannot achieve top cooking achievements without fishing.  Daily quests for various factions requires fishing in order to progress rapidly through reputation grinds.And guess what?  The act of fishing itself still sucks!  Cast.  Wait.  Click.  Harvest.  Endlessly repeat.  Sometimes skill up.  Wonder what&#8217;s for dinner.  Cast.  Wait.  Click.  Harvest.  Yawn.  Cast.  Pet the dog.  Click.  Harvest.  Think about Halo-4.  Cast.  Wait.  Click.  Harvest&#8230;.</p><p>I was perversely pleased to learn that Blizzard introduced a secondary profession that actually sucked more than fishing (with the release of Cataclysm), that profession being archeology.  But at least, in MoP, Blizzard was kind enough to accelerate the leveling process.  Archeology still sucks, don&#8217;t get me wrong, endlessly flying from the end of one continent to another to dig little holes in the ground to find worthless bag-filling crap.  But at least you can level it faster than fishing.</p><p>Point is, when I am playing, I should be strategizing how to accomplish something, not budgeting how much time I want to waste grinding a pointless secondary skill that offers little reward.</li><li>Stupidification &#8211; Blizzard, to it&#8217;s credit, has consistently and actively been dumbing-down the game for several years.  I, personally, suspect that Blizzard is trying to stupidify the game to the point where it&#8217;s playable on a console.<p>Given the nature of linear progression, soon our UI will consist of a four-button interface:  Hit, Defend, Cast, Run-away.</p><p>WoW used to contain elements within that contributed to the concept of suspension-of-disbelief.  Did your hunter bring enough arrows to make it through the raid?  Want to quaff down multiple potions to reap the benefits accumulated from your hard-work, research and knowledge?  Smite thy enemy with several debuffs at once while formulating a damage-avoidance policy?</p><p>Used to be no problem.  Now, scrolls overwrite potion buffs, of which you can only have two.  Arrows are magically generated.  And there&#8217;s the hated global cool-down timer.  (Because Blizzard can&#8217;t simulate simultaneous action or it would imbalance PvP or some other stupid excuse.)<br
/> The game used to require strategy, planning, tactics and some levels of dedicated thought in order to survive presented scenarios.   Even in PvE.  Now, it&#8217;s pretty much just playing the Hulk &#8211; smash, loot, smash, loot &#8211; in an endless cycle broken only by considering when to activate some obscure ability that has a 5-minute cool down.</p><p>Most long time players agree &#8211; one of the greatest releases of the game, truly the pinacle of design quality and just plain fun, was evidenced in the Burning Crusade release.  Gear wasn&#8217;t handed out like prozac, achievements represented significant effort and investment, and characters had to know wtf they were doing in instances in order to avoid the constant threat of party wipes.</p><p>One of the design aspects of the game that was prevalent in BC that I miss the most was that of crowd-control when facing packs of mobs.  You actually needed to have specific dps classes present in your party in order to survive the encounter.  And Blizzard also required that players actually had to know how to play their classes.  (I&#8217;m looking at you, pew-pew hunter.)</p><p>Chain trapping was an art.  DPS had rotations that had to be strictly followed in order to maximize damage.  Aggro was something tanks had to carefully manage and were required to actually switch targets in order to apply.  Healing was balanced by mana generation.  And on and on&#8230;</p><p>As an intentional design decision, game playability has become significantly more stupid with every major release that is now to the point where that as long as you can button mash certain icons on your UI, you&#8217;ve contributed all you need to contribute.   Thought, timing or talent is no longer required in normal game play.</li><li>Vehicle combat &#8211; If you raided in the past, I&#8217;d dare say that one of the most frustrating (and ridiculous) aspects of the game was the fight with Malygos.  How many of us experienced long LFG queue times only to be dropped into EoE and ended-up begging other players to not rage-quit?Why?Because vehicle combat sucks.<p>If you were lucky enough to get the full vehicle UI, (thankfully, that bug no longer exists), you had to defeat some mob or boss with vehicle that was, at best, extremely frustrating (and often pointless) to operate.</p><p>Hey!  Congrats on reaching end-game!  We&#8217;re going to reward your hard-work and dedication by completely removing you from your learned skill set and dumping you into, or onto, something that has no relevance to your class or abilities.  Commence button mashing!</p><p>Unfortunately this trend has continued into MoP despite a general consensus that this is one of the least-desirable aspects of the game.</p><p>Farming in MoP is a prime example.  You know, because it&#8217;s really a secret kind of fun to have to rodeo some plant into submission by rapid clicking an icon.  Yawn.  I mean, I could be fishing, right?</p><p>Unfortunately, vehicle combat is here to say.  It&#8217;s as if Blizzard has said: &#8220;Look, we spent ungodly amounts of development dollars putting this sub-system into place and you&#8217;re going to use it, like it or not.&#8221;</p><p>If you have to keep vehicle-based combat in-game, then ffs, limit the experience to PvP where players have already developed a high-level of pain tolerance and acceptance of in-game absurdity.</li><li>Ghostcrawler &#8211; The Blizzard employee (Mr. Greg Street) known as Ghostcrawler is the lead systems designer.  And the one responsible for most of the flaws in the game that persist release after release.  And for the infamous and smirking &#8220;nerf hammer&#8221; comment.  Yeah, I was there at that BlizCon and I saw it.<p>I have mad respect for Mr. Street and for his skills.  To a point.  Definitely way short of automatically accepting that every nugget that spews forth from his brain pan being that of pure gold.  Or elementium or whatever.</p><p>Personally, and speaking as a software developer, I have to tell you that it&#8217;s not a good thing for a system designer to have to a use &#8220;nerf-hammer&#8221; as it only evidences that the previous design was flawed.  Smirking your way through a press-conference promising that one OP class is going to face the nerf hammer isn&#8217;t a good thing.  How the hell did this flaw ever make to production in the first place?</p><p>If your patch or major release design is so flawed that players abandon the class specialization that they&#8217;ve chosen to play as a result, then you&#8217;re not doing it right.  You&#8217;ve only succeeded in reducing the love of the game for those people.  How can you not get this?</p><p>Oh, and in the real world, we usually refer to the &#8220;player base&#8221; as &#8220;customers&#8221;.  This way, it acknowledges their value to us, the organization, and imparts a sense of gratitude for their business.  Ghostcrawler has kind of managed, through countless conventions of fanboi idolatry managed to reverse the concept.<br
/> Still, I get that WoW is an inhumanely complex virtual environment that requires endless hours of meeting, analysis, and testing by the design team in order to keep the balance of the game as stable and consistent as possible.</p><p>But you really suck at the concepts of &#8220;stable&#8221; and &#8220;consistent&#8221;.  If you didn&#8217;t, then you wouldn&#8217;t constantly be cramming major changes &#8220;in order to balance gameplay&#8221; down our collective throats.  You wouldn&#8217;t make smirking promises of pending nerfdom for particular classes.  You would, instead, design the game concepts correctly and ensure that those concepts were properly implemented in code.</p><p>If you can&#8217;t get right in beta, then maybe it&#8217;s time to bring some new blood to the table.  Get a design lead that understands and actually listens to the customers and leaves their ego at the door.  Go back to embracing your corporate philosophies that generated the pinnacle BC release and screw release schedules.  If it&#8217;s not right, then don&#8217;t push it out.   We&#8217;re willing to wait for quality content.</p><p>Promise.</li><li>Storage &#8211; I am really surprised at how much time I spend managing storage of my toons.  Either the personal storage, bank storage, or guild bank storage, there just never seems to be enough empty slots for me to save all the stuff I need to save.  And the stuff I do save is impacted by some obscure absurdity principal that only Blizzard understands.<p>For example, a pouch of 20-gems takes up the same space and weight requirement as a tauren-sized, plated, chest piece.Stacking alleviates some of the issues (thank you for allowing me to stack parchment in lots of 100!) but the concept isn&#8217;t universally applied across similar items.</p><p>I get a 32-slot mining bag but I can&#8217;t put gems into it.</p><p>Or now, in MoP, I accumulate a plethora of trinkets (a spittoon - really?) that I don&#8217;t want to destroy, or can&#8217;t sell, but they&#8217;re forever going to take up a bag slot.</p><p>My main toon&#8217;s bank vault looks like the discount rack at Macy&#8217;s with all the tabards but I can&#8217;t put them away in void storage where I never have to look at them again.</p><p>Bank slots have the same restrictions as bag slots.   Really?  I should be able to stack bars of ore 100-deep on my bank because, you know, that&#8217;s the whole point of a bank.</p><p>When you find yourself actively managing storage, especially in your bank, and very-especially in your guild bank, then you&#8217;re not playing the game.  (And, perversely, getting more stuff to put into storage.)  If you&#8217;re not playing the game, then what&#8217;s the point?</li></ol><p>Ok &#8211; I&#8217;m tired and want to end this rant so I&#8217;ll just summarize&#8230;</p><p>I can ever tolerate a lot of the problems I&#8217;ve enumerated if I had the conviction that these flaws would be addressed at some point in the future.  However, Blizzard continues to concentrate on development and not maintenance, as a software practice, because of the revenue generated by major releases.  Patch content, maintenance, is an expense.</p><p>Exacerbating the problem is that game patches have lost their significance because real problems take several cycles (equivalent to years in real time) to address, if ever addressed at all.</p><p>Internally within Blizzard, focus and emphasis is on major content releases increase because of a diminishing subscriber base which, in turn, accelerates the release cycle sacrificing the overall quality of the game resulting in a reduction of the feature set that brought the subscribers on-board in the first place.   (You may have to read that sentence twice &#8211; but basically it means that Blizzard is to busy shooting itself in the foot to look for bandages.)</p><p>Putting the player-base into a myopic and hypnotic cycle of accumulating achievement points for non-essential content, emphasizing reputation accumulation, secondary skill building without providing commensurate rewards for doing so, and forcing your customers to use crappy secondary interfaces such as vehicle combat only detracts from the game.  There&#8217;s too much focus on these non-essential by-products of the game which, in turn, obfuscate all the great features that gave the game it&#8217;s towering subscriber base.</p><p>I love WoW &#8211; and I want to play the game.  I don&#8217;t want to be forced to spiral-off endlessly down non-productive paths that contribute absolutely nothing to the overall feelings of accomplishment and satisfaction that used to be ingrained into every aspect of Azeroth.</p><p>Don&#8217;t even get me started on pet battles&#8230;</p> ]]></content:encoded> <wfw:commentRss>http://shallop.com/2013/01/the-10-worst-things-about-world-of-warcraft-mists-of-pandaria/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Best Breakfast Burritos, ever!</title><link>http://shallop.com/2012/12/best-breakfast-burritos-ever/</link> <comments>http://shallop.com/2012/12/best-breakfast-burritos-ever/#comments</comments> <pubDate>Wed, 26 Dec 2012 20:53:29 +0000</pubDate> <dc:creator>Micheal Shallop</dc:creator> <category><![CDATA[Stuff]]></category> <category><![CDATA[bacon]]></category> <category><![CDATA[breakfast]]></category> <category><![CDATA[burrito]]></category> <category><![CDATA[chorizo]]></category> <category><![CDATA[egg]]></category> <category><![CDATA[food]]></category> <category><![CDATA[molcajete]]></category> <category><![CDATA[potato]]></category> <category><![CDATA[recipe]]></category> <category><![CDATA[sri-racha]]></category> <category><![CDATA[tortilla]]></category> <guid
isPermaLink="false">http://shallop.com/?p=610</guid> <description><![CDATA[I like eating a good breakfast, usually around lunchtime once I&#8217;ve had my fill of coffee and am awake enough to appreciate a good breakfast. This is my recipe for my ultimate breakfast burrito &#8211; I make this several time a week and never tire of eating it.  It&#8217;s fast, cheap and easy &#8212; you&#8217;re [...]]]></description> <content:encoded><![CDATA[<img
style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=ab05b85b6786c70c1e1db98e219f015f&amp;default=http://www.shallop.com/wp-content/uploads/avatar_2868.jpg' alt='No Gravatar' width=40 height=40/><p>I like eating a good breakfast, usually around lunchtime once I&#8217;ve had my fill of coffee and am awake enough to appreciate a good breakfast.</p><p>This is my recipe for my ultimate breakfast burrito &#8211; I make this several time a week and never tire of eating it.  It&#8217;s fast, cheap and easy &#8212; you&#8217;re breakfast is done in about 15 minutes.</p><p>Ingredients:</p><ul><li>Pork Chorizo &#8211; I usually use about 4-inches of fresh chorizo in this batch</li><li>3 fresh eggs</li><li>4 flour tortillas &#8211; I like corn but flour is better for burritos&#8230;small tortillas are what I use, about 7-8&#8243; diameter.</li><li>3 strips bacon &#8211; I like thick-cut.  If using thin-sliced bacon, consider 4 strips</li><li>sour cream &#8211; about 1/4 cup</li><li><a
href="http://www.huyfong.com/no_frames/sriracha.htm">Sri Racha</a> hot sauce</li><li>Fresh <a
href="http://www.foodnetwork.com/recipes/salsa-de-molcajete-recipe/index.html">molcajete</a> &#8211; it&#8217;s easy to make, guaranteed foodgasm if it&#8217;s still warm</li><li>Potato patty, prepared french-fries, or sliced raw potato &#8211; whatever is convenient.</li></ul><p>I use a deep-fryer, which are inexpensive and oh-so handy.  Start your bacon in a 375-degree deep-fryer or cook the conventional way.  I don&#8217;t worry about the bacon in the deep-fryer (it comes out looking &#8230; different) because I&#8217;m going to crunch up the bacon in to pieces later.  Keep an eye on the bacon to keep it from over-cooking &#8212; you want it crisp so it crumbles easily but not burned.  Burning bacon is a felony in most civilized places.  Once the bacon&#8217;s been cooking for about 3 minutes, I add the potato to the deep-frier.</p><p>Heat a skillet and use a non-stick spray (or your cooked bacon grease) to grease the pan.  I use a medium-low gas-heat setting.</p><p>If you&#8217;re cooking everything in a skillet, start by cooking your bacon until it&#8217;s well done in an un-greased skillet.   Pull the bacon and put it on some napkins or paper towels to drain.  If you accumulated more than 1/8 cup of grease in your pan, drain off the excess.   Toss in your potatoes and cook thoroughly.  Season to taste but take it easy as most of the seasoning will be provided in the salsas.  Once you&#8217;ve been cooking the potatoes so that you&#8217;ve turned them once, you can move to the next step.</p><p>Start your chorizo (you&#8217;ve already cooked the bacon) in one side of the pan and flattening it with a spatula.  (I oil the spatula so that the sausage doesn&#8217;t stick.)  Cook for about 3-4 minutes until the chorizo starts to brown.  I&#8217;m not one for crunchy-chorizo &#8211; I like mine at a soft consistency, like browned ground beef.</p><p>If you&#8217;re using a deep-fryer, rescue and drain the bacon and crumble it when it&#8217;s dry.  Remove the cooked potato.</p><p>Once you&#8217;ve flipped the chorizo over, (it should be starting to separate from releasing it&#8217;s oils), let it cook for about a minute and then crack your eggs into the skillet, on the unused side of the pan.  Once the eggs have turned white, break the yokes with your spatula and add the molcajete &#8211; enough for your taste and heat-tolerance.  I usually use a couple tablespoons.</p><p>Stir the egg and salsa mixture until its about 50% cooked.  Add the crumbled bacon.  Add the potato and use your spatula to break-up the potato into very small bits.  Stir the mixture together and continue flipping with the spatula until the eggs reach a desired consistency.  I like my eggs a little moist, not wet, and not dry.  Things should be clumping together nicely at this point and, when you&#8217;re satisfied, remove the skillet from the heat.</p><p>Use your stove griddle, or microwave, to heat four flour tortillas.  Warm but not stiff.  For however many tortillas you make, do this next:</p><ul><li>Plate a warm tortilla</li><li>I use a fork to spread a very thin layer of sour cream on the tortilla, about an inch wide.</li><li>Generous squirt of Sri Racha hot sauce on top of the sour cream</li><li>Scoop a portion of your egg-potato-chorizo-bacon-molcajete mixture into the center of tortilla, atop the sour cream/sri-racha stripe</li><li>fold the burrito</li></ul><p>Do this for all your tortillas until assembly is complete.  Pour a cold glass of milk or juice and enjoy your breakfast!  This is a very-filling, complete meal, and on the days I eat this, I usually make 3-4 small burritos and this meal lasts me the entire day.  If I get hungry in the evening, I usually just have a salad or a sliced cucumber to top-off.</p><p>Notes:</p><ul><li>Cheese is a matter of taste.  I&#8217;ve gotten used to not using cheese in any of my Mexican cooking unless it&#8217;s a quesadilla.  I find that when I&#8217;m in the US, cheese in Mexican food is a distraction to the tastes and flavors and smothers the food instead of enhancing it.  Of course, your mileage may vary.</li><li>It&#8217;s very, very easy to make molcajete &#8212; if you&#8217;ve ever enjoyed it freshly-made at your table, then you can appreciate the addiction.  The flavor is incredible and a perfect compliment to any dish, but I really like it with breakfast.</li><li>Sour cream is definitely optional &#8212; I use it for a cooling agent because the combination of the salsas can get pretty intense if you&#8217;re not used to eating spicy foods.  A little bit of sour cream is sublime &#8211; too much and you might as well be eating at Taco Bell.</li><li>I usually buy packages of potato-pancakes (hash brown patties) at the bulk stores and keep them frozen.  A single hash-brown patty is the perfect serving size for this dish.</li><li>Vegetarian chorizo works well with this dish as does the vegi-bacon.</li><li>Living in Mexico, my eggs are so fresh, chicken-butt feathers are still attached.  They&#8217;re not farmed eggs or laid from chemically-abused chickens.  They&#8217;re just eggs and definitely about a hundred times better than anything I&#8217;ve ever bought in a US grocery store.  Seriously.  If you can find something similar, try it once and I guarantee you&#8217;ll be hooked for life.</li></ul> ]]></content:encoded> <wfw:commentRss>http://shallop.com/2012/12/best-breakfast-burritos-ever/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Testing Arrays in PHP &#8211; Back to Basics&#8230;</title><link>http://shallop.com/2012/12/testing-arrays-in-php-back-to-basics/</link> <comments>http://shallop.com/2012/12/testing-arrays-in-php-back-to-basics/#comments</comments> <pubDate>Thu, 20 Dec 2012 19:49:31 +0000</pubDate> <dc:creator>Micheal Shallop</dc:creator> <category><![CDATA[Technical]]></category> <category><![CDATA[arrays]]></category> <category><![CDATA[count]]></category> <category><![CDATA[decisions]]></category> <category><![CDATA[empty]]></category> <category><![CDATA[functions]]></category> <category><![CDATA[isset]]></category> <category><![CDATA[is_null]]></category> <category><![CDATA[LAMP]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[results]]></category> <category><![CDATA[testing]]></category> <guid
isPermaLink="false">http://shallop.com/?p=595</guid> <description><![CDATA[Sometimes, when you&#8217;re wallowing through your abstraction class layers, you find yourself using code for simple functions that are normally the focus of an Intro to Programming class.  The problem is that you spend so much time on advanced topics, that your common-knowledge of simpler functions becomes&#8230; murky&#8230; You have to stop what your&#8217;re doing [...]]]></description> <content:encoded><![CDATA[<img
style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=ab05b85b6786c70c1e1db98e219f015f&amp;default=http://www.shallop.com/wp-content/uploads/avatar_2868.jpg' alt='No Gravatar' width=40 height=40/><p>Sometimes, when you&#8217;re wallowing through your abstraction class layers, you find yourself using code for simple functions that are normally the focus of an Intro to Programming class.  The problem is that you spend so much time on advanced topics, that your common-knowledge of simpler functions becomes&#8230; murky&#8230; You have to stop what your&#8217;re doing and review the manual for simple functions just to convince yourself that the results you expect are the results you&#8217;re getting in your code.</p><p>Sound familiar?</p><p>I recently encountered just this issue while evaluation whether or not my data structures were populated by testing the structure against several PHP built-in functions designed to inform me of the status of the structure.  The data structure in-question was just a multi-dimensional array or arrays used to store non-relational records within a mongo collection.  Because the data itself is an array, and each element can also be an array, the code to support the structure is all recursive when it comes to structure traversal and validation.</p><p>So the testing of the elements within the array boiled down to a simple detection to determine if I was dealing with a data element (end-point) or another array of arrays.</p><p>PHP offers several built-in functions for this type of testing:</p><ul><li><a
href="http://php.net/manual/en/function.isset.php">isset()</a> &#8211; determine if a variable is set and not null</li><li><a
href="http://php.net/manual/en/function.is-null.php">is_null()</a> &#8211; determine if a variable is null</li><li><a
href="http://php.net/manual/en/function.empty.php">empty()</a> &#8211; determine if a variable is empty: does not exist or if it&#8217;s value is FALSE</li></ul><p>What I found myself doing was writing conditionals that used combinations of these three functions.  Reviewing my code later, when I asked myself if this was really necessary, I was somewhat embarrassed by the realization that I couldn&#8217;t conclusively say.  I mean, I know what these functions do, right?  I use them daily&#8230;  but I didn&#8217;t have 100%-confidence that I was using them correctly within the context that I needed.</p><p>Reviewing the documentation on the functions (I provided the PHP.net links above), I decided that I should study the problem further, write some test stubs, and see what PHP would tell me with the return values from these methods.  I thought the results were interesting enough to share, hence this article.</p><p>Using JSON notation, let&#8217;s create a simple data structure:</p><p><p><pre class="Plum_Code_Box"><code class="javascript">foo = ( {
 { 'fname' : 'fred', 'lname' : 'flintstone', 'city' : 'bedrock' },
{ 'fname' : 'fred', 'lname' : 'flintstone', 'city' : 'bedrock' }
} )</code>
									</pre></p></p><p>In PHP, this declaration would appear like so:</p><p><p><pre class="Plum_Code_Box"><code class="php">$bar = array('fname' =&gt; 'fred', 'lname' =&gt; 'flintstone', 'city' =&gt; 'bedrock');
$foo = array($bar, $bar);</code>
									</pre></p></p><p>If we var_dump() the contents of the array, along with their associated indexes, we get this output:</p><p><p><pre class="Plum_Code_Box"><code class="php">Array
(
    [0] =&gt; Array
        (
            [fname] =&gt; fred
            [lname] =&gt; flintstone
            [city] =&gt; bedrock
        )
    [1] =&gt; Array
        (
            [fname] =&gt; fred
            [lname] =&gt; flintstone
            [city] =&gt; bedrock
        )
)
Complete Array (foo) with (bar) count: 2
array[0] count: 3
array[1] count: 3</code>
									</pre></p></p><p>So far, pretty simple.  Let&#8217;s pose these questions to see how the PHP built-in functions would handle the following scenarios:</p><ul><li>If I unset() the fname in $foo[1], will the count of the $foo[1] change?</li><li>If I unset() all of the $foo[1]&#8216;s indexes (lname, city), what will the count of $foo[1] be?</li><li>What does $foo look like now?<ul><li>Does $foo[1] test true for isset()?</li><li>Does $foo[1] test true for is_null()?</li><li>Does $foo[1] test true for empty()?</li></ul></li><li>What does $foo look like if I unset $foo[1]?<ul><li>Does $foo[1] test true for isset()?</li><li>Does $foo[1] test true for is_null()?</li><li>Does $foo[1] test true for empty()?</li></ul></li><li>What is the count() of $foo?</li><li>If I set $foo[1] to null, do my results change?<ul><li>Does $foo[1] test true for isset()?</li><li>Does $foo[1] test true for is_null()?</li><li>Does $foo[1] test true for empty()?</li></ul></li><li>Does setting $foo[1] to null count()?</li></ul><p>I wrote a small test-stub to answer all of these questions (listing is at the end of this article) and the results I got back were interesting.  Let&#8217;s take a look by answering all of the questions posed above:</p><p>The array count of $bar, as expected, is: 2.  Additionally, each sub-array within $bar has a count of: 3.  No surprises.</p><p>After I unset($foo[1]['fname']), the count of $foo[1] drops to: 2.  Not surprised.</p><p>After I unset the remaining indexed values in $foo[1] (lname, city), the count of $foo[1] is now: 0.  Not surprised.</p><p>The count($foo) however is still: 2.  Even though all of the indexed elements in $foo[1] were unset, the placeholder for $foo[1] still exists and counts.  This told me that, in a scenario where you may be stripping invalid elements from an input array, in the border-case where all of the elements are removed, using count() on the parent (containing) array will not indicate this.  Interesting.</p><p>$foo[1] tests TRUE for isset() &#8212; not surprising given the above.</p><p>$foo[1] tests TRUE for is_null() &#8212; not surprising considering the container index is basically pointing to nothing (zero elements).</p><p>$foo[1] tests TRUE for empty() &#8212; as expected.</p><p>Next, I remove the $foo[1] from the $foo array using the unset() function.  The var_dump() of $foo now shows only our first element which is still untouched as the only member within the array.  The count() of $foo is now: 1.</p><p>We apply the same series of tests and get:</p><p>$foo[1] tests FALSE for isset() and, bonus, generates a PHP notice because the offset index no longer exists.  Interesting.</p><p>$foo[1] tests TRUE for is_null().  Not surprised.</p><p>$foo[1] tests TRUE for empty().  Again, not surprised.</p><p>Finally, we&#8217;re going to set $foo[1] to NULL under the assumption that we don&#8217;t want to lose the index position of the data set during processing providing a means for quickly detecting which elements in the input data were completely discarded.</p><p>$foo[1] is now set to NULL with the following results:</p><p>$foo[1] tests FALSE for isset().  Sort of interesting in that we have a placeholder which can be counted, but since it is NULL value, it&#8217;s not &#8220;set&#8221; or present.</p><p>$foo[1] tests TRUE for is_null().  Expected.</p><p>$foo[1] tests TRUE for empty().  As documented.</p><p>Interesting, the count($foo) is back to: 2, even though the $foo[1] index is null, and no data, and tests FALSE for isset().</p><p>These results caused the generation of the following matrix:</p><p><a
href="http://shallop.com/2012/12/testing-arrays-in-php-back-to-basics/array_state/" rel="attachment wp-att-596"><img
class="alignleft size-medium wp-image-596" alt="array_state" src="http://shallop.com/wp-content/uploads/2012/12/array_state-300x157.png" width="300" height="157" /></a>Checked-boxes indicate a YES or TRUE answer while unchecked-boxes are NO or FALSE.</p><p>Of the functions tested, empty() appears to provide the best across-the-board response to decision testing with code for determining the presence (or absence) of array content as a stand-alone test.</p><p>Which leaves the question that started this entire trip down the rabbit-hole:  do I need to use multiple functions to test the state of an array or sub-array?</p><p>Probably not, in most cases &#8211; I can shave a few ticks here and  there from my code by reducing the complexity of my decision statements by eliminating redundant functions as long as I keep tight controls over my expectations of the data itself, the structure being used, and the state of the indexes.</p><p>This code was tested on an Ubuntu 12.10 install using PHP 5.4.6 (cli).  I hope you found this experiment as interesting as I did; it&#8217;s good to go back and review the basics so you KNOW what&#8217;s going in in your code&#8230;</p><p>Happy Coding!</p><p>&nbsp;</p><p>Program Listing:</p><p><p><pre class="Plum_Code_Box"><code class="php">&lt;?php
$bar = array('fname' =&gt; 'fred', 'lname' =&gt; 'flintstone', 'city' =&gt; 'bedrock');
$foo = array($bar, $bar);
print_r($foo);
echo 'Complete Array (foo) with (bar) count: ' . count($foo) . PHP_EOL;
for ($index = 0; $index &lt; count($foo); $index++) {
    echo 'array[' . $index . '] count: ' . count($foo[$index]) . PHP_EOL;
}
echo 'Nuking index 1 of foo...' . PHP_EOL;
unset($foo[1]['fname']);
echo 'unset fname...count of array[1] is: ' . count($foo[1]) . PHP_EOL;
unset($foo[1]['lname']);
unset($foo[1]['city']);
echo 'all members unset... count: ' . count($foo[1]) . PHP_EOL;
print_r($foo);
if (isset($foo[1])) {
    echo 'foo[1] tests true for isset()' . PHP_EOL;
} else {
    echo 'foo[1] tests false for isset()' . PHP_EOL;
}
if (is_null($foo[1])) {
    echo 'foo[1] tests true as null' . PHP_EOL;
} else {
    echo 'foo[1] tests false as null' . PHP_EOL;
}
if (empty($foo[1])) {
    echo 'foo[1] tests true for empty' . PHP_EOL;
} else {
    echo 'foo[1] tests false for empty' . PHP_EOL;
}
echo 'unset foo[1]...' . PHP_EOL;
unset($foo[1]);
print_r($foo);
if (isset($foo[1])) {
    echo 'foo[1] tests true for isset()' . PHP_EOL;
} else {
    echo 'foo[1] tests false for isset()' . PHP_EOL;
}
echo 'is_null($foo[1]) generates a PHP Notice:' . PHP_EOL;
if (is_null($foo[1])) {
    echo 'foo[1] tests true as null' . PHP_EOL;
} else {
    echo 'foo[1] tests false as null' . PHP_EOL;
}
if (empty($foo[1])) {
    echo 'foo[1] tests true for empty' . PHP_EOL;
} else {
    echo 'foo[1] tests false for empty' . PHP_EOL;
}
echo 'count of foo: ' . count($foo). PHP_EOL;
echo 'setting foo[1] to null...' . PHP_EOL;
$foo[1] = null;
print_r($foo);
if (isset($foo[1])) {
    echo 'foo[1] tests true for isset()' . PHP_EOL;
} else {
    echo 'foo[1] tests false for isset()' . PHP_EOL;
}
if (is_null($foo[1])) {
    echo 'foo[1] tests true as null' . PHP_EOL;
} else {
    echo 'foo[1] tests false as null' . PHP_EOL;
}
if (empty($foo[1])) {
    echo 'foo[1] tests true for empty' . PHP_EOL;
} else {
    echo 'foo[1] tests false for empty' . PHP_EOL;
}
echo 'does null count?' . PHP_EOL;
echo 'count of foo: ' . count($foo). PHP_EOL;
</code>
									</pre></p></p><p>Program Output:</p><p><p><pre class="Plum_Code_Box"><code class="php">Array
(
    [0] =&gt; Array
        (
            [fname] =&gt; fred
            [lname] =&gt; flintstone
            [city] =&gt; bedrock
        )
    [1] =&gt; Array
        (
            [fname] =&gt; fred
            [lname] =&gt; flintstone
            [city] =&gt; bedrock
        )
)
Complete Array (foo) with (bar) count: 2
array[0] count: 3
array[1] count: 3
Nuking index 1 of foo...
unset fname...count of array[1] is: 2
all members unset... count: 0
Array
(
    [0] =&gt; Array
        (
            [fname] =&gt; fred
            [lname] =&gt; flintstone
            [city] =&gt; bedrock
        )
    [1] =&gt; Array
        (
        )
)
foo[1] tests true for isset()
foo[1] tests false as null
foo[1] tests true for empty
unset foo[1]...
Array
(
    [0] =&gt; Array
        (
            [fname] =&gt; fred
            [lname] =&gt; flintstone
            [city] =&gt; bedrock
        )
)
foo[1] tests false for isset()
is_null($foo[1]) generates a PHP Notice:
PHP Notice:  Undefined offset: 1 in /home/Namaste/utilities/unsetTest.php on line 41
foo[1] tests true as null
foo[1] tests true for empty
count of foo: 1
setting foo[1] to null...
Array
(
    [0] =&gt; Array
        (
            [fname] =&gt; fred
            [lname] =&gt; flintstone
            [city] =&gt; bedrock
        )
    [1] =&gt;
)
foo[1] tests false for isset()
foo[1] tests true as null
foo[1] tests true for empty
does null count?
count of foo: 2
</code>
									</pre></p></p> ]]></content:encoded> <wfw:commentRss>http://shallop.com/2012/12/testing-arrays-in-php-back-to-basics/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Ubuntu 12.04 &#8211; Wired Connection: Device Not Managed</title><link>http://shallop.com/2012/11/ubuntu-12-04-wired-connection-device-not-managed/</link> <comments>http://shallop.com/2012/11/ubuntu-12-04-wired-connection-device-not-managed/#comments</comments> <pubDate>Mon, 12 Nov 2012 19:37:51 +0000</pubDate> <dc:creator>Micheal Shallop</dc:creator> <category><![CDATA[Technical]]></category> <category><![CDATA[12.10]]></category> <category><![CDATA[device]]></category> <category><![CDATA[eth0]]></category> <category><![CDATA[managed]]></category> <category><![CDATA[manager]]></category> <category><![CDATA[network]]></category> <category><![CDATA[networking]]></category> <category><![CDATA[not]]></category> <category><![CDATA[ubuntu]]></category> <category><![CDATA[wired]]></category> <guid
isPermaLink="false">http://shallop.com/?p=592</guid> <description><![CDATA[After I changed my laptop to a static IP configuration to support mongo clustering on my local network, I was having problems with my network manager indicator in the Unity task bar showing my wired network as the device no longer being managed.  Additionally, and exacerbating the issue, I could no longer connect to my [...]]]></description> <content:encoded><![CDATA[<img
style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=ab05b85b6786c70c1e1db98e219f015f&amp;default=http://www.shallop.com/wp-content/uploads/avatar_2868.jpg' alt='No Gravatar' width=40 height=40/><p>After I changed my laptop to a static IP configuration to support mongo clustering on my local network, I was having problems with my network manager indicator in the Unity task bar showing my wired network as the device no longer being managed.  Additionally, and exacerbating the issue, I could no longer connect to my work VPN using the network manager.</p><p>I tried several things to resolve the issue:  I restored my /etc/network/interfaces to the default (DHCP) configuration, I removed and re-installed the network manager wireless-1 configuration.  Bounced eth0 repeatedly, rebooted many times, but nothing worked and I was unable to restore the device to a managed state, nor could I connect via the VPN to work.</p><p>I hit the ubuntu forums and found the <a
href="http://ubuntuforums.org/showthread.php?t=1109585">solution</a> &#8212; edit the /etc/Network Manager/NetworkManager.conf file and change:</p><p>managed=false</p><p>to:</p><p>managed=true</p><p>I rebooted and not only got the wired device managed again, but also got my VPN restored in the process.  Magically.</p><p>Back to programming&#8230;</p> ]]></content:encoded> <wfw:commentRss>http://shallop.com/2012/11/ubuntu-12-04-wired-connection-device-not-managed/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Can&#8217;t Connect to mongo 28017 from remote host&#8230;</title><link>http://shallop.com/2012/11/cant-connect-to-mongo-28017-from-remote-host/</link> <comments>http://shallop.com/2012/11/cant-connect-to-mongo-28017-from-remote-host/#comments</comments> <pubDate>Sat, 03 Nov 2012 14:06:59 +0000</pubDate> <dc:creator>Micheal Shallop</dc:creator> <category><![CDATA[Technical]]></category> <category><![CDATA[28017]]></category> <category><![CDATA[access]]></category> <category><![CDATA[bind-ip]]></category> <category><![CDATA[host]]></category> <category><![CDATA[how-to]]></category> <category><![CDATA[mongo]]></category> <category><![CDATA[mongod]]></category> <category><![CDATA[mongodb]]></category> <category><![CDATA[port]]></category> <category><![CDATA[remote]]></category> <category><![CDATA[tcp]]></category> <guid
isPermaLink="false">http://shallop.com/?p=589</guid> <description><![CDATA[Admittedly, it&#8217;s been a long, long time since I&#8217;ve had to do a fresh install of mongodb&#8230;I am in the process of setting up a couple of mongo servers behind my firewall to use for cluster testings.  Ancient PC&#8217;s.  AMD Athalon class.  One even has a floppy disk installed. Anyway, once I had the OS [...]]]></description> <content:encoded><![CDATA[<img
style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=ab05b85b6786c70c1e1db98e219f015f&amp;default=http://www.shallop.com/wp-content/uploads/avatar_2868.jpg' alt='No Gravatar' width=40 height=40/><p>Admittedly, it&#8217;s been a long, long time since I&#8217;ve had to do a fresh install of mongodb&#8230;I am in the process of setting up a couple of mongo servers behind my firewall to use for cluster testings.  Ancient PC&#8217;s.  AMD Athalon class.  One even has a floppy disk installed.</p><p>Anyway, once I had the OS installed (Ubuntu 12.10 server) and all the various packages, including mongodb, added to the system, I wanted to access the mongodb from another machine on my network but for the life of me I couldn&#8217;t connect to the default port of 28017.</p><p>Oh, I could connect from localhost using <em>wget</em> without problem.</p><p><em>netstat -a | grep -i listen</em></p><p>Showed port *:28017 in listen mode so no problem there&#8230;</p><p>I even added the port via iptables to the firewall rules:</p><p><em>iptables -A INPUT -p tcp -d 0/0 -s 0/0 &#8211;dport 28017 -j ACCEPT</em></p><p>But I still couldn&#8217;t connect.</p><p>I started to browse /etc/mongodb.conf file looking for a configuration setting that may prevent me from accessing remotely and there is was:</p><p><em>bind-ip = 127.0.0.1</em></p><p>Since I don&#8217;t have concerns about security on my private network, I commented out this line and restarted mongo services.</p><p>(side note:  you don&#8217;t want to do this on a production server &#8211; instead, use a comma-separated list of ip-addresses to specifically authorize which remote hosts you will permit to connect to your mongo server.)</p><p>Worked!  Full access from within my network to mongod!</p><p>Hope this helps!</p> ]]></content:encoded> <wfw:commentRss>http://shallop.com/2012/11/cant-connect-to-mongo-28017-from-remote-host/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Quick Update&#8230;</title><link>http://shallop.com/2012/10/quick-update/</link> <comments>http://shallop.com/2012/10/quick-update/#comments</comments> <pubDate>Thu, 25 Oct 2012 17:23:37 +0000</pubDate> <dc:creator>Micheal Shallop</dc:creator> <category><![CDATA[Announcements]]></category> <category><![CDATA[Site]]></category> <category><![CDATA[announcement]]></category> <category><![CDATA[message]]></category> <category><![CDATA[mongodb]]></category> <category><![CDATA[mysql]]></category> <category><![CDATA[personal]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[rabbitmq]]></category> <category><![CDATA[update]]></category> <guid
isPermaLink="false">http://shallop.com/?p=584</guid> <description><![CDATA[Sorry this blog has been inactive for so long but I&#8217;ve been really, really busy with work, and my move to Puerto Nuevo, Mexico in northern BC. I am thinking about putting together a series of posts that detail how to set-up a data-processing stack, in PHP, for mongodb that allows you to dynamically generate [...]]]></description> <content:encoded><![CDATA[<img
style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=ab05b85b6786c70c1e1db98e219f015f&amp;default=http://www.shallop.com/wp-content/uploads/avatar_2868.jpg' alt='No Gravatar' width=40 height=40/><p>Sorry this blog has been inactive for so long but I&#8217;ve been really, really busy with work, and my move to Puerto Nuevo, Mexico in northern BC.</p><p>I am thinking about putting together a series of posts that detail how to set-up a data-processing stack, in PHP, for mongodb that allows you to dynamically generate all CRUD queries via the class stack.</p><p>The front-end interface, to this stack, is through RabbitMQ &#8212; also written in PHP &#8212; which eliminates Apache from the  LAMP stack, and no longer requires a REST interface for transferring data requests to-and-from store.</p><p>The stack includes services such as auditing, registration for public-facing requests, memcached and membase support, error-logging, and internal checks on requests that prevent things like query generation that result in full-table scans or any searches on un-indexed columns within either mongodb or mysql. (I think I still remember how to code for mysql&#8230; <img
src='http://shallop.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> )</p><p>Anyway, this project has been all-consuming for me for the past year and the concept of generalizing the stack for instructional purposes has been rattling around in my can now, looking for a way out, for quite some time.  It&#8217;s not like there&#8217;s a plethora of PHP-based RabbitMQ tutorials out there either.</p><p>So, that&#8217;s the happs.  Now that things are settling down a bit, I&#8217;ll try to get more information out.</p><p>Thank you for checking-in!</p> ]]></content:encoded> <wfw:commentRss>http://shallop.com/2012/10/quick-update/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>PHP: Comparing Object Structures</title><link>http://shallop.com/2012/08/php-comparing-object-structures/</link> <comments>http://shallop.com/2012/08/php-comparing-object-structures/#comments</comments> <pubDate>Tue, 21 Aug 2012 18:21:42 +0000</pubDate> <dc:creator>Micheal Shallop</dc:creator> <category><![CDATA[Technical]]></category> <category><![CDATA[clones]]></category> <category><![CDATA[comparisons]]></category> <category><![CDATA[copies]]></category> <category><![CDATA[development]]></category> <category><![CDATA[equals]]></category> <category><![CDATA[identities]]></category> <category><![CDATA[LAMP]]></category> <category><![CDATA[object]]></category> <category><![CDATA[objects]]></category> <category><![CDATA[oop]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[program]]></category> <category><![CDATA[programming]]></category> <category><![CDATA[triple-equals]]></category> <guid
isPermaLink="false">http://shallop.com/?p=564</guid> <description><![CDATA[I&#8217;m working on a project where I am converting an established REST API over to a rabbitMQ service.  Because, you know, dinosaur, I&#8217;m continuing to use PHP as my language of choice for both the rabbitMQ producers and consumers.  (Sorry &#8211; just not there with Python.  Yet.) Anyway, as part of the architecture, I&#8217;m building [...]]]></description> <content:encoded><![CDATA[<img
style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=ab05b85b6786c70c1e1db98e219f015f&amp;default=http://www.shallop.com/wp-content/uploads/avatar_2868.jpg' alt='No Gravatar' width=40 height=40/><p><a
href="http://shallop.com/wp-content/uploads/2012/08/apples-and-oranges1.jpg"><img
class="alignleft size-medium wp-image-565" style="margin: 5px;" title="apples-and-oranges1" src="http://shallop.com/wp-content/uploads/2012/08/apples-and-oranges1-300x225.jpg" alt="" width="300" height="225" /></a></p><p>I&#8217;m working on a project where I am converting an established REST API over to a rabbitMQ service.  Because, you know, dinosaur, I&#8217;m continuing to use PHP as my language of choice for both the rabbitMQ producers and consumers.  (Sorry &#8211; just not there with Python.  Yet.)</p><p>Anyway, as part of the architecture, I&#8217;m building a rabbitMQ service to handle all incoming requests that would normally be handled as POST requests thought the REST API.</p><p>Our data flow necessitates the rapid store of several different types of objects loosely associated with real-world events and objects:  users, registration, browser events, etc.  You get the idea:  the data is different but kind-of the same&#8230;different enough to require different class objects (because of the data retrieval or storage requirements) yet close enough that, as the programmer, you&#8217;re constantly plagued by deja-vu when it comes to coding the class methods.</p><p>The development team collectively decided to make the move to a queue-messaging system so I evaluated and chose RabbitMQ as the framework to use to convert my existing REST API.</p><p>Without going too deep into details (a future article and I want to keep this post somewhat easy), I have the option of pooling the collection of incoming data that, under REST (segregated based on object functionality: members, subscriptions, payments, etc.), into a single collection point.  In other words, using REST, each real-world object has a dedicated service which is represented in the REST/data stack as a REST service attached to a PHP class object which is extended from a base data class dependent on mongo which, in turn, is extended from a base data handling class (auditing, memcache, etc.).</p><p>What that means is that if I have 20 or so services offered via REST, I probably have 20 different REST map files that process a POST request that can instantiate up to 20 different object classes unique to the service being offered.  No problem &#8211; but under RabbitMQ, this can be done better.</p><p>The problem/challenge I encountered (I&#8217;m intentionally skipping ahead here because I don&#8217;t want this article to be about either RabbitMQ or REST) is that I wanted establish a single consumer service for accepting and storing the input data for all of my object classes.  In other words, for any incoming data to be stored, I want to be able to peek at the structure being used to store the data and then invoke the proper class to handle data validation and storage.</p><p>So &#8230; the point is, I want my RabbitMQ queue consumer to evaluate the incoming data structures and determine <em>which</em> data classes I&#8217;ll need to work with and to dispatch the work accordingly to the class handlers.</p><p>Comparing objects is the point of this article &#8212; if I get an object for a user, I want to invoke the user class.  If I get a registration data-packet, the registration class and so-on&#8230;</p><p>This, in-turn, led me down the rathole of PHP object comparison and I picked-up a few things to share with you&#8230;so, at least, we get to the point of the article.</p><p>When comparing PHP objects, you usually have one of two goals in-mind:  I want to see if the object <em>contents</em> are the same, or I want to see if the object <em>structures</em> are the same.</p><p>For the purposes of my program, I want to evaluate the structure itself and dispatch the data to the appropriate class handler; I don&#8217;t care about the contents &#8212; that&#8217;s the designated responsibility of said class handler.</p><p>But, fear not, I will talk about comparing PHP objects as it relates to the contents.  For this, we&#8217;ll use the &#8216;==&#8217; and &#8216;===&#8217; operators.</p><p>Conceptually, I am going to create two base classes, named cat and dog.  From these classes we&#8217;ll instantiate variable structures and compare these structures against each other.  The code to do all this is at the bottom of this article so here&#8217;s the walk through:</p><p><strong>The Plan</strong></p><p>I am going to instantiate two variables:  $siamese and $persian of members of the <em>cat</em> class.</p><p>I am going to instantiate one variable: $husky as a member of the <em>dog</em> class.</p><p>I am going to clone the variable $malamute from $husky.</p><p>Both dog and cat have identical class variables and methods.  (For simplicity, one of each.)</p><p>After I create my variables, I am going to compare them (within their classes) for equality  (&#8216;==&#8217;) and then compare them for identity (&#8216;===&#8217;).</p><p>Next, I will increment $siamese and $husky and repeat the above checks.</p><p>Next, I will declare a copy of $husky and name him $einstein (my dog!) and repeat the checks.</p><p>Then I will determine who&#8217;s a cat and who&#8217;s a dog &#8212; looking at the structure of the class and not the contents.</p><p>And, finally, I will var_dump the relative structures so you can see the contents.</p><p><strong>The Results</strong></p><p>In the initial comparisons of $siamese to $persian, the comparison operators evaluate <em>true</em> but the identity operators evaluate <em>false</em>.  This makes logical sense:  Siamese and Persians are both cats, but this Siamese has a different identify from this Persian.</p><p>When I increment the member variable ($a) within $siamese and re-run the comparison, both checks now evaluate false.  The Siamese no longer has the same <em>contents</em> as the Persian and they still don&#8217;t have the same identity.</p><p>For sanity, I check to ensure that a $husky is not a $persian in both comparison and identity checks and, thankfully, it&#8217;s not.</p><p>Next, I clone $malamute from $husky and run the basic checks:</p><p>The Malamute has the same contents as the Husky, but they do not have the same identity.</p><p>Next, let&#8217;s create $einstein by making him a copy of $husky with the assignment (&#8216;=&#8217;) operator and run the comparisons &#8212; no surprise:  Einstein has the same contents as Husky and has the same <em>identity</em>.  The identity check evaluated true because both objects share the same memory space and this is shown by:</p><p>I call the method in $einstein to increment the member variable by one and re-run the comparison:  both checks again evaluate to true because we&#8217;re manipulating shared memory space objects.  In other words, although both $einstein and $husky have the same member variable ($a), both variables are pointing to the same physical storage location in memory.  So, if I change the contents of $a in $einstein, the contents of $a in $husky changes as well.</p><p>By var_dump&#8217;ing (dispaying the contents) of these variables, I can see that the $husky&#8217;s member variable ($a) has been incremented even though the increment operation was done by the $einstein object.</p><p>Finally, let&#8217;s use the PHP function <em>instanceof</em> to evaluate the type of class we have.  This is the dispatch mechanism I am using in RabbitMQ to invoke the correct object class for processing my incoming data.</p><p>I use instanceof to ask if $siamese is a <em>dog</em> or $husky is a <em>cat</em>.  Pretty straightforward &#8212; and I get the expected results in the output.</p><p><strong>Wrap-Up</strong></p><p>So, hopefully, you know when to use &#8216;==&#8217; and &#8216;===&#8217; when comparing PHP objects and what an object <em>identity</em> is, and the difference between comparing the <em>contents</em> of a class versus evaluating the <em>structure</em> of a class.</p><p>Source code and sample output below&#8230;hope this helps!</p><div
id="wpshdo_1" class="wp-synhighlighter-outer"><div
id="wpshdt_1" class="wp-synhighlighter-expanded"><table
border="0" width="100%"><tr><td
align="left" width="80%"><a
name="#codesyntax_1"></a><a
id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Source code</a></td><td
align="right"><a
href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img
border="0" style="border: 0 none" src="http://shallop.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a
href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img
border="0" style="border: 0 none" src="http://shallop.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a
href="http://shallop.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img
border="0" style="border: 0 none" src="http://shallop.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div
id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><div
class="php" style="font-family:monospace;"><span
class="kw2">&lt;?php</span><br
/> <span
class="kw2">class</span> cat<br
/> <span
class="br0">&#123;</span><br
/> <span
class="kw2">public</span> <span
class="re0">$a</span> <span
class="sy0">=</span> <span
class="nu0">1</span><span
class="sy0">;</span><br
/> <span
class="kw2">public</span> <span
class="kw2">function</span> addone<span
class="br0">&#40;</span><span
class="br0">&#41;</span><br
/> <span
class="br0">&#123;</span><br
/> <span
class="re0">$this</span><span
class="sy0">-&gt;</span><span
class="me1">a</span> <span
class="sy0">=</span> <span
class="sy0">++</span><span
class="re0">$this</span><span
class="sy0">-&gt;</span><span
class="me1">a</span><span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="kw2">class</span> dog<br
/> <span
class="br0">&#123;</span><br
/> <span
class="kw2">public</span> <span
class="re0">$a</span> <span
class="sy0">=</span> <span
class="nu0">1</span><span
class="sy0">;</span><br
/> <span
class="kw2">public</span> <span
class="kw2">function</span> addone<span
class="br0">&#40;</span><span
class="br0">&#41;</span><br
/> <span
class="br0">&#123;</span><br
/> <span
class="re0">$this</span><span
class="sy0">-&gt;</span><span
class="me1">a</span> <span
class="sy0">=</span> <span
class="sy0">++</span><span
class="re0">$this</span><span
class="sy0">-&gt;</span><span
class="me1">a</span><span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="re0">$siamese</span> <span
class="sy0">=</span> <span
class="kw2">new</span> cat<span
class="br0">&#40;</span><span
class="br0">&#41;</span><span
class="sy0">;</span><br
/> <span
class="re0">$persian</span> <span
class="sy0">=</span> <span
class="kw2">new</span> cat<span
class="br0">&#40;</span><span
class="br0">&#41;</span><span
class="sy0">;</span><br
/> <span
class="re0">$husky</span> <span
class="sy0">=</span> <span
class="kw2">new</span> dog<span
class="br0">&#40;</span><span
class="br0">&#41;</span><span
class="sy0">;</span><br
/> <span
class="re0">$malamute</span> <span
class="sy0">=</span> clone <span
class="re0">$husky</span><span
class="sy0">;</span><br
/> <span
class="re0">$einstein</span> <span
class="sy0">=</span> <span
class="re0">$husky</span><span
class="sy0">;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$siamese</span> <span
class="sy0">==</span> <span
class="re0">$persian</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'siamese == persian'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><span
class="kw1">else</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'siamese != persian'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$siamese</span> <span
class="sy0">===</span> <span
class="re0">$persian</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'siamese === persian'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span> <span
class="kw1">else</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'siamese !== persian'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'calling siamese-&gt;addone()'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="re0">$siamese</span><span
class="sy0">-&gt;</span><span
class="me1">addone</span><span
class="br0">&#40;</span><span
class="br0">&#41;</span><span
class="sy0">;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$siamese</span> <span
class="sy0">==</span> <span
class="re0">$persian</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'siamese == persian'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span> <span
class="kw1">else</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'siamese != persian'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$siamese</span> <span
class="sy0">===</span> <span
class="re0">$persian</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'siamese === persian'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span> <span
class="kw1">else</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'siamese !== persian'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$husky</span> <span
class="sy0">==</span> <span
class="re0">$persian</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'husky == persian'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span> <span
class="kw1">else</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'husky != persian'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$husky</span> <span
class="sy0">===</span> <span
class="re0">$persian</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'husky === persian'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span> <span
class="kw1">else</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'husky !== persian'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'clone wars...'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$husky</span> <span
class="sy0">==</span> <span
class="re0">$malamute</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'husky == malamute'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span> <span
class="kw1">else</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'husky != malamute'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$husky</span> <span
class="sy0">===</span> <span
class="re0">$malamute</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'husky === malamute'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span> <span
class="kw1">else</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'husky !== malamute'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'playing with Einstein: '</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$einstein</span> <span
class="sy0">==</span> <span
class="re0">$husky</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'einstein == husky'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span> <span
class="kw1">else</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'einstein != husky'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$einstein</span> <span
class="sy0">===</span> <span
class="re0">$husky</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'einstein === husky'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span> <span
class="kw1">else</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'einstein !== husky'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'calling einstein-&gt;addone()'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="re0">$einstein</span><span
class="sy0">-&gt;</span><span
class="me1">addone</span><span
class="br0">&#40;</span><span
class="br0">&#41;</span><span
class="sy0">;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$einstein</span> <span
class="sy0">==</span> <span
class="re0">$husky</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'einstein == husky'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span> <span
class="kw1">else</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'einstein != husky'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$einstein</span> <span
class="sy0">===</span> <span
class="re0">$husky</span><span
class="br0">&#41;</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'einstein === husky'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span> <span
class="kw1">else</span> <span
class="br0">&#123;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'einstein !== husky'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="br0">&#125;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$siamese</span> instanceof cat<span
class="br0">&#41;</span> <span
class="kw1">echo</span> <span
class="st_h">'siamese is a cat'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$siamese</span> instanceof dog<span
class="br0">&#41;</span> <span
class="kw1">echo</span> <span
class="st_h">'siamese is a dog'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$husky</span> instanceof cat<span
class="br0">&#41;</span> <span
class="kw1">echo</span> <span
class="st_h">'husky is a cat'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="kw1">if</span> <span
class="br0">&#40;</span><span
class="re0">$husky</span> instanceof dog<span
class="br0">&#41;</span> <span
class="kw1">echo</span> <span
class="st_h">'husky is a dog'</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <span
class="kw1">echo</span> <span
class="st_h">'var-dumps:'</span> <span
class="sy0">.</span> PHP_EOL <span
class="sy0">.</span> <span
class="st_h">'husky: '</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <a
href="http://www.php.net/var_dump"><span
class="kw3">var_dump</span></a><span
class="br0">&#40;</span><span
class="re0">$husky</span><span
class="br0">&#41;</span><span
class="sy0">;</span><br
/> <span
class="kw1">echo</span> PHP_EOL <span
class="sy0">.</span> <span
class="st_h">'malamute: '</span> <span
class="sy0">.</span> PHP_EOL<span
class="sy0">;</span><br
/> <a
href="http://www.php.net/var_dump"><span
class="kw3">var_dump</span></a><span
class="br0">&#40;</span><span
class="re0">$malamute</span><span
class="br0">&#41;</span><span
class="sy0">;</span><br
/> <span
class="kw1">echo</span> PHP_EOL<span
class="sy0">;</span></div></div></div><p><strong>Output:</strong></p><div
id="wpshdo_2" class="wp-synhighlighter-outer"><div
id="wpshdt_2" class="wp-synhighlighter-expanded"><table
border="0" width="100%"><tr><td
align="left" width="80%"><a
name="#codesyntax_2"></a><a
id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Source code</a></td><td
align="right"><a
href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img
border="0" style="border: 0 none" src="http://shallop.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a
href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img
border="0" style="border: 0 none" src="http://shallop.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a
href="http://shallop.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img
border="0" style="border: 0 none" src="http://shallop.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div
id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><div
class="bash" style="font-family:monospace;">siamese == persian<br
/> siamese <span
class="sy0">!</span>== persian<br
/> calling siamese-<span
class="sy0">&gt;</span>addone<span
class="br0">&#40;</span><span
class="br0">&#41;</span><br
/> siamese <span
class="sy0">!</span>= persian<br
/> siamese <span
class="sy0">!</span>== persian<br
/> husky <span
class="sy0">!</span>= persian<br
/> husky <span
class="sy0">!</span>== persian<br
/> clone wars...<br
/> husky == malamute<br
/> husky <span
class="sy0">!</span>== malamute<br
/> playing with Einstein:<br
/> einstein == husky<br
/> einstein === husky<br
/> calling einstein-<span
class="sy0">&gt;</span>addone<span
class="br0">&#40;</span><span
class="br0">&#41;</span><br
/> einstein == husky<br
/> einstein === husky<br
/> siamese is a <span
class="kw2">cat</span><br
/> husky is a dog<br
/> var-dumps:<br
/> husky:<br
/> object<span
class="br0">&#40;</span>dog<span
class="br0">&#41;</span><span
class="co0">#3 (1) {</span><br
/> <span
class="br0">&#91;</span><span
class="st0">&quot;a&quot;</span><span
class="br0">&#93;</span>=<span
class="sy0">&gt;</span><br
/> int<span
class="br0">&#40;</span><span
class="nu0">2</span><span
class="br0">&#41;</span><br
/> <span
class="br0">&#125;</span><br
/> malamute:<br
/> object<span
class="br0">&#40;</span>dog<span
class="br0">&#41;</span><span
class="co0">#4 (1) {</span><br
/> <span
class="br0">&#91;</span><span
class="st0">&quot;a&quot;</span><span
class="br0">&#93;</span>=<span
class="sy0">&gt;</span><br
/> int<span
class="br0">&#40;</span><span
class="nu0">1</span><span
class="br0">&#41;</span><br
/> <span
class="br0">&#125;</span></div></div></div> ]]></content:encoded> <wfw:commentRss>http://shallop.com/2012/08/php-comparing-object-structures/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Mountain Lion and Tunnelblick &#8211; Playing Nice Together</title><link>http://shallop.com/2012/07/mountain-lion-and-tunnelblick-playing-nice-together/</link> <comments>http://shallop.com/2012/07/mountain-lion-and-tunnelblick-playing-nice-together/#comments</comments> <pubDate>Fri, 27 Jul 2012 16:04:56 +0000</pubDate> <dc:creator>Micheal Shallop</dc:creator> <category><![CDATA[Technical]]></category> <category><![CDATA[bolehvpn]]></category> <category><![CDATA[code]]></category> <category><![CDATA[dns]]></category> <category><![CDATA[google]]></category> <category><![CDATA[isp]]></category> <category><![CDATA[lion]]></category> <category><![CDATA[mountain]]></category> <category><![CDATA[nameserver]]></category> <category><![CDATA[opendns]]></category> <category><![CDATA[openvpn]]></category> <category><![CDATA[opvn]]></category> <category><![CDATA[os x]]></category> <category><![CDATA[tunnelblick]]></category> <category><![CDATA[vpn]]></category> <guid
isPermaLink="false">http://shallop.com/?p=556</guid> <description><![CDATA[One of the things that requires some tweaking after the installation of Mac OS X (Mountain Lion) is Tunnelblick, a free and open-source GUI for openVPN.  I use Tunnelblick for work and play so it&#8217;s pretty important that it be working correctly. After Mountain Lion installed, Tunnelblick no longer worked on either of my VPNs. [...]]]></description> <content:encoded><![CDATA[<img
style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=ab05b85b6786c70c1e1db98e219f015f&amp;default=http://www.shallop.com/wp-content/uploads/avatar_2868.jpg' alt='No Gravatar' width=40 height=40/><p><a
href="http://shallop.com/wp-content/uploads/2012/07/tb-icon-96x96.png"><img
class="alignleft size-full wp-image-557" style="margin: 5px;" title="tb-icon-96x96" src="http://shallop.com/wp-content/uploads/2012/07/tb-icon-96x96.png" alt="" width="96" height="96" /></a>One of the things that requires some tweaking after the installation of Mac OS X (Mountain Lion) is <a
href="https://code.google.com/p/tunnelblick/">Tunnelblick</a>, a free and open-source GUI for openVPN.  I use Tunnelblick for work and <a
href="http://shallop.com/2012/07/using-a-vpn-for-everything/">play</a> so it&#8217;s pretty important that it be working correctly.</p><p>After Mountain Lion installed, Tunnelblick no longer worked on either of my VPNs.  Scanning the forums, blogs, and support sites, I found several solutions, none of which worked on their own (for me), but instead required combining the solutions to get things to work.</p><p>First, you&#8217;re going to need to de-install your existing copy of Tunnelblick but, before you do, open a finder window, or cd from the command line, into &#8220;~/Library/Application Support/Tunnelblick&#8221;.</p><p>Copy all of your current configuration files to someplace safe in the event you don&#8217;t need new configuration files for your VPN.  Personally, I use BolehVPN and   I generated new key files as part of this process.  My work VPN files are going to require some tweaking too but, either way, it&#8217;s always nice to have back-ups so you don&#8217;t have to start-over from scratch creating your configs.</p><p>I used a sweet little program called <a
href="http://www.appzapper.com/">AppZapper</a> to remove Tunnelblick &#8211; it thoroughly cleans out all files associated with the app &#8211; hence the reason why you want to back-up your config files.</p><p>Once you&#8217;ve removed Tunnelblick, download the <em>beta</em> version of the software.  The current release is versioned at 3.2.6(2891.3007) and was built on May 3, 2012.  This version does not work with Mountain Lion.</p><p>You want to download and install <a
href="http://code.google.com/p/tunnelblick/downloads/detail?name=Tunnelblick_3.3beta16.dmg">Tunnelblick 3.3</a>.  The Beta release version changed four iterations in 24-hours so don&#8217;t worry about which rev your getting &#8212; this has worked for me since beta release 12.</p><p>Once you&#8217;re down with the install, you can either download new key files (certificates, keys, and configs with the opvn extension) or you can see if your current configurations will work with the beta.</p><p>Once I installed the new key files, I found that I could connect to my VPN provider successfully, but I couldn&#8217;t do anything after that point.</p><p>If this is the case for you, which you can confirm by loading a website by it&#8217;s IP address instead of the URL&#8230; As a matter of routine, it&#8217;s good to memorize (or at least write-down) this IP address: 74.125.53.100 which is the IP address for google.com.</p><p>If you can get Google to load by IP and not by name, (google.com), in the URL bar, then you need to tweak your nameserver settings for your VPN configuration.</p><p>Click on the Tunnelblick icon in your menu bar and then click on &#8220;VPN Details&#8221; at the bottom of the drop down.  This will open a dialog box with your available VPN configurations on the left in a scrolling text box and, on the right, a two-tab  panel for your Logs and Settings.</p><p>If your connection failed, scroll through the information under the Log tab and you should see something that looks like this:</p><div
id="wpshdo_3" class="wp-synhighlighter-outer"><div
id="wpshdt_3" class="wp-synhighlighter-expanded"><table
border="0" width="100%"><tr><td
align="left" width="80%"><a
name="#codesyntax_3"></a><a
id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Source code</a></td><td
align="right"><a
href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img
border="0" style="border: 0 none" src="http://shallop.com/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a
href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img
border="0" style="border: 0 none" src="http://shallop.com/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a
href="http://shallop.com/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img
border="0" style="border: 0 none" src="http://shallop.com/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div
id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="text" style="font-family:monospace;">2012-07-27 08:51:06 *Tunnelblick process-network-changes: SearchDomains changed from
*
*                     to
*                    &lt;array&gt; {
*                    0 : openvpn
*                    }
*                    pre-VPN was
*</pre></div></div><p>This information shows you that you&#8217;ve no search domains selected for the new VPN connection because normally you should see IP address in these containers.  Unless you do everything by IP address, you&#8217;re going to be dead in the water&#8230;so&#8230;.</p><p>Click on your VPN listing and then click on the Settings tab.</p><p>By default, your DNS/WNS configuration has the setting &#8220;Set nameserver&#8221;.  You want to change this setting to &#8220;Set nameserver (3.0b10)&#8221;.</p><p>Click back to the Log tab and attempt your connection.  You should be able to successfully resolve DNS/WNS at this point however, if for some reason this doesn&#8217;t work, then go back to the Settings tab and try the other nameserver options in the drop down.</p><p>Finally, something else you may wish to check is your DNS server settings for your OS.  Open System Preferences -&gt; Network -&gt; Advanced&#8230; for your internet connection.   Click on the DNS tab and look a your nameservers listed in the box on the left side.</p><p>If you&#8217;re using your ISP&#8217;s router IP as your DNS server, you&#8217;re probably going to have a bad time.  I use Google&#8217;s nameservers but there are other free nameservers available too, such as <a
href="http://www.opendns.com/home-solutions/">OpenDNS</a>.  Whatever you decide to use, enter the nameserver IP address in this block after removing the IP for your ISP or network router.</p><p>Google&#8217;s DNS nameserver IPs are: 8.8.8.8 and 8.8.4.4.</p><p>That&#8217;s it!  Hope this helps!</p><p>&nbsp;</p><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://shallop.com/2012/07/mountain-lion-and-tunnelblick-playing-nice-together/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>My Top-10 Mac OS X Apps&#8230;</title><link>http://shallop.com/2012/07/my-top-10-mac-os-x-apps/</link> <comments>http://shallop.com/2012/07/my-top-10-mac-os-x-apps/#comments</comments> <pubDate>Thu, 26 Jul 2012 23:07:53 +0000</pubDate> <dc:creator>Micheal Shallop</dc:creator> <category><![CDATA[Technical]]></category> <category><![CDATA[1password]]></category> <category><![CDATA[applications]]></category> <category><![CDATA[apps]]></category> <category><![CDATA[boom]]></category> <category><![CDATA[busycal]]></category> <category><![CDATA[caffeine]]></category> <category><![CDATA[f.lux]]></category> <category><![CDATA[favorite]]></category> <category><![CDATA[flux]]></category> <category><![CDATA[google]]></category> <category><![CDATA[mac]]></category> <category><![CDATA[os x]]></category> <category><![CDATA[top-10]]></category> <category><![CDATA[totalterminal]]></category> <category><![CDATA[visor]]></category> <category><![CDATA[voice]]></category> <guid
isPermaLink="false">http://shallop.com/?p=552</guid> <description><![CDATA[I&#8217;ve just upgraded my iMac to OS X Mountain Lion and, as with all OS upgrades, I need to tweak a few things, update some packages say goodbye to others.  This got me thinking:  What are the apps that I can&#8217;t live without? To make my top-10 list, the software has have to been in-use [...]]]></description> <content:encoded><![CDATA[<img
style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=ab05b85b6786c70c1e1db98e219f015f&amp;default=http://www.shallop.com/wp-content/uploads/avatar_2868.jpg' alt='No Gravatar' width=40 height=40/><p><a
href="http://shallop.com/wp-content/uploads/2012/07/images-3.jpeg"><img
class="alignleft size-full wp-image-553" title="images-3" src="http://shallop.com/wp-content/uploads/2012/07/images-3.jpeg" alt="" width="213" height="236" /></a>I&#8217;ve just upgraded my iMac to OS X Mountain Lion and, as with all OS upgrades, I need to tweak a few things, update some packages say goodbye to others.  This got me thinking:  What are the apps that I can&#8217;t live without?</p><p>To make my top-10 list, the software has have to been in-use for some time or be exceptional.  Not all of the software is free s0, where applicable, prices are listed.  In all cases, download links are provided.</p><p>So, presented in some sort of an order representing nothing logical, I present my list of <em>Mike&#8217;s Top-10 List of OS-X Software Without Which I Would I Would Hate Life</em>&#8230;</p><h4>#1 &#8211; 1Password</h4><p>I learned about this application several years ago from a co-worker.  Like most, I used simple passwords that rotated whenever I needed a change.  Basically, I was trading security for simplicity and this worked pretty well for me until I started thinking about everything I could lose.  Initial examination of the <a
href="https://agilebits.com/onepassword">1Password&#8217;s</a> website left me panting&#8230;$40 dollars for a single license?!?  I bit the bullet and paid for a license, downloaded and installed it&#8230;and have never looked back.</p><p>Quite simply, I would be lost in the ether were it not for 1Password.  As of this writing, I have 186 web logins and 19 system accounts stored.  I also have all my software licenses recorded in the event something heads south &#8212; indeed, this feature has saved my bacon from the fire on more than one occasion.</p><p>What makes it my Number-One app?</p><p>Well, I&#8217;ve given up on simple passwords.  I use the auto-generator now for all my passwords and I feel a lot more secure when I read news about some web-repository being breached for their user/password list.  If you get my apple password, you&#8217;ll not get my gmail password so, win.  Plus, using the auto-generator, you can specify a lot of options: length, combination of special characters, letters, numbers, case, etc.</p><p>Chrome, Safari and Netflix have browser extensions for 1Password which allow me to one-click enter my username/password combination for all my websites for which I&#8217;ve recorded logins.  I love one-click functionality!</p><p>I have 1Password installed on all my iOS devices and I upgraded my license to the Mac/Windows combination.  I use different passwords on each device to <em>open</em> 1Password so even if I lose a device, I&#8217;m covered.</p><p>1Password syncs to Dropbox and I keep back-up copies of the encrypted file locally because, you know, paranoia.</p><p>My only (remotely) negative comment about 1Password is that there&#8217;s not a version available for Linux.  However, you can still <a
href="http://shallop.com/2012/04/1password-on-ubuntu-11-10-oneiric/">access your 1Password files via a web-browser</a> accessing the dropbox-store html file graciously provided.</p><p>I&#8217;ve had occasion to contact AgileBit&#8217;s technical support a couple times and, in all cases, the replies were friendly, prompt and astute.  Very good people working there!</p><p>Don&#8217;t worry about the costs of this application &#8211; once you start using all of the features available (like credit-card autofill for online retail therapy), you&#8217;ll soon realize how awesome this program really is.</p><h4>#2 &#8211; Caffeine</h4><p>I started using caffeine a year or two ago and I really love this program.  Whenever I am configuring a new system, I make sure this app is installed.  What it does is prevent your computer from going to sleep.  It installs and is visible in the menu bar and is (de)activated with a single click.</p><p>That&#8217;s pretty much all it does.</p><p>It&#8217;s a top-10 add because (a) it keeps me out of System Preferences and (b) it only takes one click.  Useful for watching videos (Netflix, Amazon Prime, etc.) because it&#8217;s keeps your screen-saver off.   Also, I hate it when the s/s kicks-in when I&#8217;m doing stuff on another machine but I am using the caffeine-box to monitor work-in-progress and the screen suddenly shuts off.</p><p>This app is mac-only, but there&#8217;s a similar, alternative, program available as an <a
href="http://ubuntu-tweak.com/app/caffeine/">indicator app for Ubuntu</a> which works just as well.</p><h4>#3 &#8211; Quicksilver</h4><p>I&#8217;ve previously poo-poo&#8217;d apps like <a
href="http://qsapp.com">Quicksilver</a>, Albert, and Apple&#8217;s own finder because I&#8217;m pretty much a point-and-click person.  Ubuntu 11.10 changed that for me with the Unity launcher.  Previously, I&#8217;d always been a point-and-clicker&#8230;but I learned that you can launch apps much quicker with a few keystrokes and not have to fumble for and use the mouse to accomplish the same task.</p><p>I&#8217;m not a power user by any stretch.  Friends of mine do a lot more stuff with their launcher apps (<a
href="http://www.obdev.at/products/launchbar/index.html">launchbar</a> &#8211; which was cost-prohibitive) but, for me, Quicksilver works very well for search and launch tasks.</p><p>Quicksilver is an open-source groupware project and is free but if you like it, consider <a
href="http://qsapp.com/donate.php">donating</a> to keep the project alive.</p><p>There&#8217;s lots of blog posts out there about how to be a power user with Quicksilver.  Explore and enjoy.</p><h4>#4 &#8211; Omnigraffle</h4><p><a
href="http://www.omnigroup.com/products/omnigraffle/">Omnigraffle</a> makes me a documentation <em>god</em>.  It&#8217;s available for the Mac and the iPad.  It&#8217;s expensive.  Did I mention that it turns you into a documentation <em>god</em>?</p><p>Omnigraffle is a diagramming and drawing application.  It uses a drag-n-drop interface coupled with a near-unlimited number of stencils that allows you to effortlessly create jaw-dropping diagrams.</p><p>I use this program a lot to document my software development and, whenever I publish documentation, my co-workers <em>always</em> ask me what tool I used to create my diagrams.  I find it especially useful for ER diagrams and flowcharts but I&#8217;ve also used it for a variety of other diagrams.</p><p>The single user license is $99 and, trust me, is well worth the price for what you can do with this program.</p><p>One of my favorite features is to select-all and then paste my diagram into the other applications like Pages.  Also, you can do easy image conversion by pasting other images into Omnigraffle and then re-selecting and copy-paste into your target app.</p><p>It works, has frequent updates and a generous update license and it freakin&#8217; turns you into a documentation god!</p><h4>#5 &#8211; Cloudapp</h4><p><a
href="http://getcloudapp.com">Cloudapp</a> is a simple little applet that sits quietly in your menu bar.  The coin of the realm for this applet is something called <em>raindrops</em>.  The applet is designed so that you can drag-and-drop music, links, files, and images (or hot-key them as raindrops) and then produce a short-url for sharing.</p><p>You can click on the site-icon (right to the left of the URL in your address bar) and drag it to the cloud icon in your menu bar.  The web-site link is then pushed to Cloudapp where it&#8217;s saved as one of your recent drops.  The menu bar shows your most-recent five raindrops.  You&#8217;ll need to login to the web site to see all of your saved drops.</p><p>I like this app because it&#8217;s a simple process to save a link that I want to review or evaluate later.  I&#8217;ve not used the app for anything other than saving links so I can&#8217;t speak to it&#8217;s ability to save/share images and whatnot.  But, for what I use it for, it&#8217;s invaluable.  I discovered this app before pinterest existed and, although I use both, I use cloudapp to remember mostly technical resources that I need to investigate further.</p><p>And, it&#8217;s free.</p><h4>#6 TotalTerminal</h4><p>I do a lot of work from the command line (cli) &#8211; I will use vi on the cli before I use any GUI text editor simply because it&#8217;s faster and distraction free.</p><p>I love <a
href="http://totalterminal.binaryage.com">TotalTerminal</a> (aka Visor) and if I don&#8217;t have it on my system, I install it immediately.</p><p>Remember the Quake console?  TotalTerminal provides you with a persistent Visor window which slides down (or in, or up) on a hot key (I use ctrl-~).  Instead of alt-tabbing to your terminal, which also takes up desktop realestate, TotalTerminal slides in and out, gliding like a ninja in the night.</p><p>I set-up mine to have about 50% transparency, green text over black, so that I can see my desktop beneath the terminal window for visual cues as to commands I need to type, reminders of what I was doing when I was struck dumb my TotalTerminals effortless appearance, etc.</p><p>I use <a
href="http://guake.org">guake</a> on my Ubuntu desktop which operates the same way.</p><h4>#7 BusyCal</h4><p>I have maintained for years that the person who can write a unified calendar and address book will make enough money to own their own island complete with little umbrella drinks.</p><p>Syncing all my handheld devices (iOS and Android) with Apple calendar, Google calendar, and their respective address books, with my Mac, has been nothing short of a nightmare.</p><p>Of course I need <em>seven</em> duplicate listing for my vet in address book, right?  I need <em>four</em> copies of the same meeting notice&#8230;</p><p>Busycal is a sexy calendar app for the Mac to replace Apple&#8217;s Calendar and, since installing it over a year ago, I&#8217;ve never looked back.  Nor have I had duplicate calendar entries unless I intentionally put them there.</p><p>I fully realize there may be some hidden juju magic to being able to sync cross-platform, cross-device but, to date, this escapes me leaving me feel I&#8217;m barely qualified enough to play Windows solitaire.</p><p>Busycal syncs with Google and Apple for my calendars.  It displays my to-do lists. (Which are unused.)  And it even shows me the current five-day forecast.  (Clicking on the weather icon for today took me <a
href="http://www.accuweather.com/en/mx/puerto-nuevo/1691634/daily-weather-forecast/1691634?day=1&amp;p=busymac">here</a>.)</p><p>In short, it works.  It has read-access to iCal calendars.  It access my Google calendars effortlessly.</p><p>It&#8217;s $49.99 and their technical support rocks.</p><h4>#8 &#8211; F.lux</h4><p>When I first heard about <a
href="http://stereopsis.com/flux/">F.lux</a>, I unsuccessfully bit back a derisive snort of laughter.  Really?  A program for adjusting my screen brightness?  Depending on my location?  And the time of day?  Reducing my eyestrain?</p><p>Really?</p><p>Tell me more&#8230;</p><p>F.lux is a small, easily-configurable app, that sites in your menu bar.  Once you configure the app to your location and your viewing preferences, it gradually adjusts the brightness and warmth (or coolness) of your screen display depending on your local time.</p><p>You can tweak all the settings, specifying different levels of adjustment in brightness (measured in K units), but all you really need to do is tell f.lux where you are, what kind of lighting your have, and it takes care of the rest.</p><p>I&#8217;ve noticed that when I&#8217;m using the computer during darkness, my screen is much warmer, less-blue, which is less stressful to my vision and relaxes me.  And, according to their website, blue light in the evening can disturb your sleep patterns.</p><p>Anything for better sleep, I&#8217;m down with.</p><p>It&#8217;s a free program and is available for Mac, Windows, Linux and iOS devices.  Go f.lux your computer for a few days (sorry, it had to be said) and see if you can see how much more enjoyable your screen is.</p><h4>#9 &#8211; Boom</h4><p><a
href="http://www.globaldelight.com/boom/">Boom</a> is a godsend for me.  I&#8217;m hard-of-hearing and rely on binaural hearing aids for simple conversation.</p><p>Boom allows you to boost your system&#8217;s volume and your music files.  Plus, Boom also provides you with a system-wide equalizer.  (I use the latter to selectively increase the frequencies that I have difficulty hearing.)</p><p>Overall, I think Boom, as a digital amplifier, only gives you about 20% more volume (then again, what do I know?) over the conservative db output of your conventional Mac.</p><p>For me, however, Boom is the difference between needing and not-needing close-captioning on Netflix.  Being able to use Skype.</p><p>Boom boosts everything and is available on the app-store for a measly $5.99.</p><h4>#10 &#8211; Google Voice</h4><p>I love my <a
href="http://google.com/voice">Google Voice</a> app.  I give my GV number out now as my main contact number.</p><p>GV allows me to forward all GV calls to any number.  Currently, I forward my calls to my cellphone (when I am in the US) and to my Skype number.</p><p>If I miss a call, GV transcribes (as best it can &#8211; some of you have serious diction issues) the voice mail left and then GV emails the transcript <em>and</em> texts me the transcription to my devices.</p><p>Did I mention that it&#8217;s free?</p><p>GV works cross platform as long as you have speakers and a mic.  Bonus, I can also use GV to send text messages.</p><p>&nbsp;</p><p>Ok, that about wraps it up.  I know top-10 lists are hideously subjective so please feel free to leave a comment about what you think should have made it to my list.</p><p>Oh, and bonus tip since I&#8217;m exiting on kind of a google note &#8211;</p><p>When you&#8217;re outside the US and you want to use Google&#8217;s US resources instead of the current-country, enter this in your URL bar before you sign-in to google:</p><p>http://www.google.com/ncr</p><p>The <em>ncr</em> means &#8220;no country re-direct&#8221; and will park you on the US property for the remainder of your stay.</p><p>Have fun!</p> ]]></content:encoded> <wfw:commentRss>http://shallop.com/2012/07/my-top-10-mac-os-x-apps/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Configure an External RAID-1 USB Drive for Backups &#8211; Ubuntu 12.04</title><link>http://shallop.com/2012/07/configure-an-external-raid-1-usb-drive-for-backups-ubuntu-12-04/</link> <comments>http://shallop.com/2012/07/configure-an-external-raid-1-usb-drive-for-backups-ubuntu-12-04/#comments</comments> <pubDate>Tue, 24 Jul 2012 23:15:57 +0000</pubDate> <dc:creator>Micheal Shallop</dc:creator> <category><![CDATA[Technical]]></category> <category><![CDATA[12.04]]></category> <category><![CDATA[back-up]]></category> <category><![CDATA[device]]></category> <category><![CDATA[disk]]></category> <category><![CDATA[external]]></category> <category><![CDATA[gparted]]></category> <category><![CDATA[howto]]></category> <category><![CDATA[linux]]></category> <category><![CDATA[mdadm]]></category> <category><![CDATA[partition]]></category> <category><![CDATA[raid]]></category> <category><![CDATA[raid1]]></category> <category><![CDATA[software]]></category> <category><![CDATA[storage]]></category> <category><![CDATA[technical]]></category> <category><![CDATA[ubuntu]]></category> <category><![CDATA[usb]]></category> <guid
isPermaLink="false">http://shallop.com/?p=549</guid> <description><![CDATA[I have a WD USB 3.0 500gb hard drive for my work laptop who&#8217;s sole purpose in life is to record back-ups of my Ubuntu 12.04 system.  I&#8217;ve never formatted the device and it&#8217;s always worked very well for me despite my cavalier treatment: tossing it around in my backpack during my commute mostly. I [...]]]></description> <content:encoded><![CDATA[<img
style='float: left; margin-right: 10px; border: none;' src='http://www.gravatar.com/avatar.php?gravatar_id=ab05b85b6786c70c1e1db98e219f015f&amp;default=http://www.shallop.com/wp-content/uploads/avatar_2868.jpg' alt='No Gravatar' width=40 height=40/><p><a
href="http://shallop.com/wp-content/uploads/2012/07/wddrive.jpg"><img
class="alignleft size-full wp-image-550" style="margin-top: 5px; margin-bottom: 5px;" title="wddrive" src="http://shallop.com/wp-content/uploads/2012/07/wddrive.jpg" alt="" width="300" height="300" /></a>I have a <a
href="http://www.amazon.com/Western-Digital-Passport-Essential-Portable/dp/B0041OSAZS/ref=sr_1_5?ie=UTF8&amp;qid=1343168463&amp;sr=8-5&amp;keywords=western+digital+500gb+my+passport+essential+usb">WD USB 3.0 500gb hard drive</a> for my work laptop who&#8217;s sole purpose in life is to record back-ups of my Ubuntu 12.04 system.  I&#8217;ve never formatted the device and it&#8217;s always worked very well for me despite my cavalier treatment: tossing it around in my backpack during my commute mostly.</p><p>I use a program called <em><a
href="http://backintime.le-web.org/">back-in-time</a></em> for my backups and I like it for it&#8217;s ease-of-use coupled with a healthy sense of fire-and-forget.</p><p>Recently, my back-ups started failing with generic write-fail errors so I committed to re-formatting the device.  Since I was going to nuke it, I decided to implement RAID-1 during it&#8217;s resurrection just to have an &#8220;extra&#8221; copy of my back-ups.  The partition I back-up is only 100gb &#8212; which is currently about 55% full &#8212; so splitting the device into two logical drives and configuring under RAID shouldn&#8217;t be a problem, right?</p><p>I mean, I have absolutely NO experience with RAID so how hard can this be?</p><p>After a few false starts, I honed down the process and this is what I&#8217;m sharing with you today.  Oh, and as side note &#8212; in the first paragraph, I linked to this particular drive on Amazon as a courtesy &#8212; I&#8217;m not getting and referrals or anything like that&#8230;just thought you might want to see what we&#8217;re dealing with.</p><h4>Phase 1 &#8211; Installation of Tools</h4><p>Ok &#8211; so, to get started, I needed to install <a
href="http://linuxmanpages.com/man8/mdadm.8.php">mdadm</a> which was pretty easy:</p><div
class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div
class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span
style="color: #666666; font-style: italic;"># sudo apt-get install mdadm</span></div></div><p>What was somewhat confusing was the need for mdadm to install a mailing agent &#8211; for the monitoring tool, but during the installation I elected to not configure the mail program and everything still went smoothly.</p><p>Next, I installed gparted and all of the available options through the Ubuntu Software Center app.</p><p>I already had back-in-time installed and I provided the link above.  Use the Ubuntu Software Center to install this app if you don&#8217;t already have it.</p><p>With all the software in-place, it&#8217;s time to configure the device.</p><h4>Part 2 &#8211; Wiping and Configuring the Device</h4><p>Plug your device into your system and wait for it to automount &#8212; which it will do if it still has the factory-equipped partition installed.  Once it&#8217;s installed, go to your command line and unmount the device:</p><div
class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div
class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span
style="color: #666666; font-style: italic;"># umount /dev/{your_mount_point_here}</span></div></div><p>Either <a
href="http://linuxmanpages.com/man8/sudo.8.php">sudo</a> this command, or sudo over to root.  I chose the latter as I get tired of forgetting to sudo.</p><p>Once the device is unmounted, start-up gparted,, authenticate, and wait for gparted to stop scanning for devices.  Change your device over to your external drive which was, for me: /dev/sdb.</p><blockquote><p>(Side note: The WD drive comes with it&#8217;s own software which just swell if you&#8217;re a Windows or a Mac user.  Otherwise, the software is just taking up space.  Copy these programs if you want but you can always download replacements from the WD website.)</p></blockquote><p>For me, the drive was formatted into one single, large, partition.  Delete this partition and don&#8217;t look back.</p><p>Next, split your partition into two smaller partitions, equally dividing the available space between the two.  RAID-1 is mirroring &#8211; you&#8217;re creating two logical partitions in this device but you will mount it (the system will see it) as a single device.  Data is written to the first partition and RAID copies the data over to the second partition, <em>mirroring</em> the data to the second logical partition.</p><p>I chose the ext3 filesystem for my partition simply because:</p><ul><li>it&#8217;s better than ext2</li><li>it&#8217;s robust</li><li>I don&#8217;t believe I&#8217;ll get any speed benefits from ext4 (USB, eh?)</li></ul><div>Make a note of the names of the logical partitions (Mine was /dev/sdb1 and /dev/sdb2.) as you&#8217;re going to need to know this later.</div><p>Note too that you&#8217;re not actually doing anything at this point &#8211; you&#8217;re just building a task-list for gparted to execute when you&#8217;re finished creating tasks.</p><p>Next, flag each partition as a RAID partition by right-clicking -&gt; Manage Flags -&gt; Raid.</p><p>Once this is done, you&#8217;re ready to execute your task list which will partition and flag the devices.  When the task list completes successfully, you can quit gparted.</p><h4>Step 3 &#8211; MDADM</h4><p>Next, you need to create the software RAID volume using the mdadm tool.</p><p>This is very easy and is done with a single command:</p><div
class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div
class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span
style="color: #666666; font-style: italic;"># mdadm --create --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdb1 &lt;a title=&quot;/dev/sdb2&quot; href=&quot;file:///dev/sdb2&quot;&gt;/dev/sdb2&lt;/a&gt;</span></div></div><p>What this command does is:</p><ul><li>invokes mdadm with the &#8211;create option (useful for creating RAID arrays)</li><li>specifies the &#8220;verbose&#8221; flag so you can get meaningful diagnostics should something head south</li><li>specifies the mount-point device (/dev/md0) for your RAID</li><li>specifies your RAID level (&#8211;level-1) (remember, 1 = mirroring)</li><li>specifies the number of devices in your RAID (&#8211;raid-devices=2)</li><li>lists the device links for the logical drives to be used in the RAID (/dev/sdb1, /dev/sdb2)</li></ul><div>In the screen-shot below, I highlighted the raid mountpoint device, /dev/md0, because (a) I kept forgetting it was a required parameter to the command and (b) I am going to need this device name for the next command&#8230;</div><div></div><div><div
class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div
class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span
style="color: #000000; font-weight: bold;">&lt;/</span>div<span
style="color: #000000; font-weight: bold;">&gt;</span><br
/> <span
style="color: #000000; font-weight: bold;">&lt;</span>div<span
style="color: #000000; font-weight: bold;">&gt;</span><br
/> <br
/> <span
style="color: #666666; font-style: italic;"># mdadm --create --verbose &lt;strong&gt;/dev/md0&lt;/strong&gt; --level=1 --raid-devices=2 /dev/sdb1 /dev/sdb2</span><br
/> mdadm: <span
style="color: #000000; font-weight: bold;">/</span>dev<span
style="color: #000000; font-weight: bold;">/</span>sdb1 appears to contain an ext2fs <span
style="color: #c20cb9; font-weight: bold;">file</span> system<br
/> <span
style="color: #c20cb9; font-weight: bold;">size</span>=244174848K <span
style="color: #007800;">mtime</span>=Wed Dec 31 16:00:00 1969<br
/> mdadm: Note: this array has metadata at the start and<br
/> may not be suitable <span
style="color: #c20cb9; font-weight: bold;">as</span> a boot device. If you plan to<br
/> store <span
style="color: #ff0000;">'/boot'</span> on this device please ensure that<br
/> your boot-loader understands md<span
style="color: #000000; font-weight: bold;">/</span>v1.x metadata, or use<br
/> <span
style="color: #660033;">--metadata</span>=0.90<br
/> mdadm: <span
style="color: #000000; font-weight: bold;">/</span>dev<span
style="color: #000000; font-weight: bold;">/</span>sdb2 appears to contain an ext2fs <span
style="color: #c20cb9; font-weight: bold;">file</span> system<br
/> <span
style="color: #c20cb9; font-weight: bold;">size</span>=244177920K <span
style="color: #007800;">mtime</span>=Wed Dec 31 16:00:00 1969<br
/> mdadm: <span
style="color: #c20cb9; font-weight: bold;">size</span> <span
style="color: #000000; font-weight: bold;">set</span> to 244173688K<br
/> Continue creating array? <span
style="color: #c20cb9; font-weight: bold;">yes</span><br
/> mdadm: Defaulting to version <span
style="color: #000000;">1.2</span> metadata<br
/> mdadm: array <span
style="color: #000000; font-weight: bold;">/</span>dev<span
style="color: #000000; font-weight: bold;">/</span>md0 started.<br
/> <br
/> <span
style="color: #000000; font-weight: bold;">&lt;/</span>div<span
style="color: #000000; font-weight: bold;">&gt;</span><br
/> <span
style="color: #000000; font-weight: bold;">&lt;</span>div<span
style="color: #000000; font-weight: bold;">&gt;</span></div></div></div><p>Press enter to execute the command and you should get the prompt back after a few seconds.  Note that the program requires no input from you.</p><h4>Step 4 &#8211; Making and Mounting</h4><p>This is the step that most of the online and available pages on mdadm leave out.</p><p><em>You still need to format your filesystem!</em></p><p>So, let&#8217;s do this with <a
href="http://linuxmanpages.com/man8/mkfs.8.php">mkfs</a>&#8230;</p><div
class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div
class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span
style="color: #666666; font-style: italic;"># mkfs -t ext3 &lt;strong&gt;/dev/md0&lt;/strong&gt;</span><br
/> mke2fs 1.42 <span
style="color: #7a0874; font-weight: bold;">&#40;</span>29-Nov-2011<span
style="color: #7a0874; font-weight: bold;">&#41;</span><br
/> Filesystem <span
style="color: #007800;">label</span>=<br
/> OS <span
style="color: #7a0874; font-weight: bold;">type</span>: Linux<br
/> Block <span
style="color: #c20cb9; font-weight: bold;">size</span>=4096 <span
style="color: #7a0874; font-weight: bold;">&#40;</span><span
style="color: #007800;">log</span>=2<span
style="color: #7a0874; font-weight: bold;">&#41;</span><br
/> Fragment <span
style="color: #c20cb9; font-weight: bold;">size</span>=4096 <span
style="color: #7a0874; font-weight: bold;">&#40;</span><span
style="color: #007800;">log</span>=2<span
style="color: #7a0874; font-weight: bold;">&#41;</span><br
/> <span
style="color: #007800;">Stride</span>=0 blocks, Stripe <span
style="color: #007800;">width</span>=0 blocks<br
/> 15261696 inodes, 61043422 blocks<br
/> 3052171 blocks <span
style="color: #7a0874; font-weight: bold;">&#40;</span>5.00<span
style="color: #000000; font-weight: bold;">%</span><span
style="color: #7a0874; font-weight: bold;">&#41;</span> reserved <span
style="color: #000000; font-weight: bold;">for</span> the super user<br
/> First data <span
style="color: #007800;">block</span>=0<br
/> Maximum filesystem <span
style="color: #007800;">blocks</span>=4294967296<br
/> 1863 block <span
style="color: #c20cb9; font-weight: bold;">groups</span><br
/> 32768 blocks per group, 32768 fragments per group<br
/> 8192 inodes per group<br
/> Superblock backups stored on blocks:<br
/> 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,<br
/> 4096000, 7962624, 11239424, 20480000, 23887872<br
/> <br
/> Allocating group tables: <span
style="color: #000000; font-weight: bold;">done</span><br
/> Writing inode tables: <span
style="color: #000000; font-weight: bold;">done</span><br
/> Creating journal <span
style="color: #7a0874; font-weight: bold;">&#40;</span>32768 blocks<span
style="color: #7a0874; font-weight: bold;">&#41;</span>: <span
style="color: #000000; font-weight: bold;">done</span><br
/> Writing superblocks and filesystem accounting information: <span
style="color: #000000; font-weight: bold;">done</span></div></div><p>Note that I use the RAID mount-point address of /dev/md0 to create the filesystem.</p><p>This will take a few minutes to run so go take a stretch break and play with the dog or annoy your hot receptionist or something.</p><p>Once this step completes, you&#8217;re pretty much done &#8212; all that&#8217;s left is mounting the device and using it.</p><div
class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div
class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span
style="color: #666666; font-style: italic;"># mount /dev/md0 /media/raid</span><br
/> <br
/> <span
style="color: #000000; font-weight: bold;">&amp;</span>lt;<span
style="color: #000000; font-weight: bold;">do</span> stuff like start a back-up<span
style="color: #000000; font-weight: bold;">&amp;</span>gt;<br
/> <br
/> <span
style="color: #666666; font-style: italic;"># df -h</span><br
/> Filesystem Size Used Avail Use<span
style="color: #000000; font-weight: bold;">%</span> Mounted on<br
/> <span
style="color: #000000; font-weight: bold;">/</span>dev<span
style="color: #000000; font-weight: bold;">/</span>mapper<span
style="color: #000000; font-weight: bold;">/</span>PAMCAKES-root 84G 9.4G 70G <span
style="color: #000000;">12</span><span
style="color: #000000; font-weight: bold;">%</span> <span
style="color: #000000; font-weight: bold;">/</span><br
/> udev 3.9G 4.0K 3.9G <span
style="color: #000000;">1</span><span
style="color: #000000; font-weight: bold;">%</span> <span
style="color: #000000; font-weight: bold;">/</span>dev<br
/> tmpfs 1.6G 920K 1.6G <span
style="color: #000000;">1</span><span
style="color: #000000; font-weight: bold;">%</span> <span
style="color: #000000; font-weight: bold;">/</span>run<br
/> none 5.0M <span
style="color: #000000;">0</span> 5.0M <span
style="color: #000000;">0</span><span
style="color: #000000; font-weight: bold;">%</span> <span
style="color: #000000; font-weight: bold;">/</span>run<span
style="color: #000000; font-weight: bold;">/</span>lock<br
/> none 3.9G 49M 3.9G <span
style="color: #000000;">2</span><span
style="color: #000000; font-weight: bold;">%</span> <span
style="color: #000000; font-weight: bold;">/</span>run<span
style="color: #000000; font-weight: bold;">/</span>shm<br
/> <span
style="color: #000000; font-weight: bold;">/</span>dev<span
style="color: #000000; font-weight: bold;">/</span>sda2 242M 159M 71M <span
style="color: #000000;">70</span><span
style="color: #000000; font-weight: bold;">%</span> <span
style="color: #000000; font-weight: bold;">/</span>boot<br
/> <span
style="color: #000000; font-weight: bold;">/</span>dev<span
style="color: #000000; font-weight: bold;">/</span>mapper<span
style="color: #000000; font-weight: bold;">/</span>PAMCAKES-user 93G 48G 42G <span
style="color: #000000;">54</span><span
style="color: #000000; font-weight: bold;">%</span> <span
style="color: #000000; font-weight: bold;">/</span>home<br
/> <span
style="color: #000000; font-weight: bold;">/</span>dev<span
style="color: #000000; font-weight: bold;">/</span>md0 230G 22G 196G <span
style="color: #000000;">11</span><span
style="color: #000000; font-weight: bold;">%</span> <span
style="color: #000000; font-weight: bold;">/</span>media<span
style="color: #000000; font-weight: bold;">/</span>raid</div></div><p>Note that your available filesystem space is approximate one-half the capacity of the drive.</p><p>That&#8217;s right &#8211; you paid a whopping $89 for a 500gb device out of which you can use about 230gb.</p><p>But you have <em>two</em> of them.  So if your first partition fails, you&#8217;ve got a back-up of your back-up thanks to the wondrous magic of RAID.  And, you learned how to set-up a RAID device, so, win.</p><p>Unless one of your kids (or grandkids) decides that your sleek, new, external device looks better in the fish tank than it does on your desk, you have an additional and available option for recovering lost data.</p><p>Keep in mind that this is a software solution &#8212; hardware RAID is still the preferred way to go when dealing with issues of redundant data storage.  But this works, too.</p><h4>Step 5 &#8211; Maintenance</h4><p>To stop your RAID device use this command:</p><p># mdadm &#8211;stop /dev/md0</p><p>To see the state of your RAID, cat /proc/mdstat to your terminal:</p><div
class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div
class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span
style="color: #666666; font-style: italic;"># cat /proc/mdstat</span><br
/> Personalities : <span
style="color: #7a0874; font-weight: bold;">&#91;</span>raid0<span
style="color: #7a0874; font-weight: bold;">&#93;</span> <span
style="color: #7a0874; font-weight: bold;">&#91;</span>raid1<span
style="color: #7a0874; font-weight: bold;">&#93;</span><br
/> md0 : active raid1 sdb2<span
style="color: #7a0874; font-weight: bold;">&#91;</span>1<span
style="color: #7a0874; font-weight: bold;">&#93;</span> sdb1<span
style="color: #7a0874; font-weight: bold;">&#91;</span>0<span
style="color: #7a0874; font-weight: bold;">&#93;</span><br
/> 244173688 blocks super 1.2 <span
style="color: #7a0874; font-weight: bold;">&#91;</span>2<span
style="color: #000000; font-weight: bold;">/</span>2<span
style="color: #7a0874; font-weight: bold;">&#93;</span> <span
style="color: #7a0874; font-weight: bold;">&#91;</span>UU<span
style="color: #7a0874; font-weight: bold;">&#93;</span><br
/> <span
style="color: #7a0874; font-weight: bold;">&#91;</span><span
style="color: #000000; font-weight: bold;">&amp;</span>gt;....................<span
style="color: #7a0874; font-weight: bold;">&#93;</span> resync = 1.8<span
style="color: #000000; font-weight: bold;">%</span> <span
style="color: #7a0874; font-weight: bold;">&#40;</span>4474560<span
style="color: #000000; font-weight: bold;">/</span>244173688<span
style="color: #7a0874; font-weight: bold;">&#41;</span> <span
style="color: #007800;">finish</span>=4948.7min <span
style="color: #007800;">speed</span>=806K<span
style="color: #000000; font-weight: bold;">/</span>sec<br
/> <br
/> unused devices: <span
style="color: #000000; font-weight: bold;">&amp;</span>lt;none<span
style="color: #000000; font-weight: bold;">&amp;</span>gt;</div></div><p>To get details about your RAID, use mdadm:</p><div
class="codecolorer-container bash blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div
class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span
style="color: #666666; font-style: italic;"># mdadm --detail /dev/md0</span><br
/> <span
style="color: #000000; font-weight: bold;">/</span>dev<span
style="color: #000000; font-weight: bold;">/</span>md0:<br
/> Version : 1.2<br
/> Creation Time : Tue Jul 24 14:41:55 2012<br
/> Raid Level : raid1<br
/> Array Size : 244173688 <span
style="color: #7a0874; font-weight: bold;">&#40;</span>232.86 GiB 250.03 GB<span
style="color: #7a0874; font-weight: bold;">&#41;</span><br
/> Used Dev Size : 244173688 <span
style="color: #7a0874; font-weight: bold;">&#40;</span>232.86 GiB 250.03 GB<span
style="color: #7a0874; font-weight: bold;">&#41;</span><br
/> Raid Devices : 2<br
/> Total Devices : 2<br
/> Persistence : Superblock is persistent<br
/> <br
/> Update Time : Tue Jul 24 14:42:51 2012<br
/> State : active, resyncing<br
/> Active Devices : 2<br
/> Working Devices : 2<br
/> Failed Devices : 0<br
/> Spare Devices : 0<br
/> <br
/> Resync Status : 2<span
style="color: #000000; font-weight: bold;">%</span> <span
style="color: #7a0874; font-weight: bold;">complete</span><br
/> <br
/> Name : pamcakes:0 <span
style="color: #7a0874; font-weight: bold;">&#40;</span><span
style="color: #7a0874; font-weight: bold;">local</span> to host pamcakes<span
style="color: #7a0874; font-weight: bold;">&#41;</span><br
/> UUID : b542c27c:1d620c3e:6f07b9e8:53aee08d<br
/> Events : 1<br
/> <br
/> Number Major Minor RaidDevice State<br
/> 0 8 17 0 active <span
style="color: #c20cb9; font-weight: bold;">sync</span> <span
style="color: #000000; font-weight: bold;">/</span>dev<span
style="color: #000000; font-weight: bold;">/</span>sdb1<br
/> 1 8 18 1 active <span
style="color: #c20cb9; font-weight: bold;">sync</span> <span
style="color: #000000; font-weight: bold;">/</span>dev<span
style="color: #000000; font-weight: bold;">/</span>sdb2</div></div><p>To uncouple the RAID device:</p><p># mdadm &#8211;remove /dev/md0</p><p>&nbsp;</p><p>That&#8217;s it for today&#8230;hope this helps&#8230;there&#8217;s a lot of good information already available on the web for using mdadm and software RAID &#8211; I just wanted to consolidate everything into a contiguous process.</p><p>Later, should sufficient motivation present itself, I&#8217;ll follow-up with alerts and what not&#8230;</p><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://shallop.com/2012/07/configure-an-external-raid-1-usb-drive-for-backups-ubuntu-12-04/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>