A Modest Shitpost Proposal (Or, Shitposal)

I’m blown away by the vigor that the SCP community jumped on the Crack Fiction Contest with. I’m not sure if it’s because it’s allowing for low-level funny posts, or because of the super-short notice, less than a day to go from title to execution. Whatever the reason, there’s a lot of latent excitement there. I am thus wanting to seriously consider a spin-off wiki that does nothing but short-term events, for a couple of reasons.

Firstly, these contests are incredibly disruptive when we do them on the main wiki. It positively fills up the newly created queue, drowning out unrelated mainlist entries and tales, drowning out requests for critique, and generally derails the site for the duration of the contest.

(Note, I am not advocating that there should never be contests on the main site, just that when they occur pretty much nothing else can.)

Second, some people just work better with a writing prompt, and there’s really no limit to how the prompts can work. It will result in an altogether different content then what’s on the main wiki, and logically they should probably be separated as people looking for one type of content aren’t necessarily interested in the other. This is a similar reasoning to the aborted attempt to run regular fuel contests on /r/scp which would become a writing prompt, ultimately axed because it would be too disruptive to do on the main site regularly (see the first point) and Reddit wasn’t a good place to host the content.

Third, it will give me a good way to get live Admin-level access to a working, active wikidot wiki to better build out PF, should the time come that we actually incorporate. I have put out there that I will not continue development of Project Foundation until we are at least moving in the direction of being incorporated in some way. I’m not working on it, but I am thinking about it, and how I might want to do certain things and solve certain problems.

Fourth, it might just be a hell of a lot of fun, and a way to avoid the problem of “Everything I want to write about has already been done.” It should be much more relaxed, much less pressure if you don’t do well because, hey, a new contest is coming up soon.

Alright, I want to talk about some of the ways this could work. I like somewhere between 24 and 36 hours between being given the prompt and the deadline. It’s roughly enough time to sleep on it, write something, get some feedback, and let it go, sink-or-swim. I also like the idea of “flash” events on a shorter timeline like four hours. I also like the idea of keeping track of these contests across “seasons”, keeping track of accumulated contests and having the top X writers participate in some sort of “gauntlet,” mixing different kinds of media. Since it’s not fun to show up halfway into a season and having to wait forever for the next, seasons could be short, maybe 3 months.

Writing prompts could be any number of things:

  • Given a lead-off sentence.
  • Given a word or phrase to include.
  • Given a random image from the internet, vetted by prompt team for CC compliance and quality.
  • Asked to reference an existing SCP, AA, GOI, or something else from the main site.
  • Word count, word limit, word-size limit, etc.
  • Web-based sources that generate randomness, e.g., a friend of mine has a bot that generates poetry. There are sites like the library of babel that can be referenced in an article.

One thing with prompts, they could also be solicited from the forums. I think the list of all accepted prompts, prompts that will be done at some point in the future, will be public knowledge, but the choice of a prompt will be done randomly by a script.

Considering a schedule, I’m thinking something like an average contest would be prompted at, say, 8AM Monday, deadline at 8PM Tuesday. Voting runs to 8PM Thursday, winner declared, discussion, etc. New prompt goes up on Friday at 8AM. So every four days, and that’s not a bad thing. It means if you’ve usually only got one or two good days in a week to write, the contest schedule will eventually line up with yours.

There’s one big problem. I don’t have a name for this. SCPs Done Quick? Flash SCP? I have no idea. So many good ideas were a name away from success.

Ransomware is the future.

(crossposted from bluesoul.me)

When I first started fighting ransomware in late 2013, I had a premonition that this was something serious. While CryptoLocker was rather easily defeated in the enterprise and ultimately killed by killing the botnet, media outlets and tech sites ran with the story. It showed this small group making millions and millions of dollars. Guess what? More people started writing ransomware.

Cut to now. Ransomware-as-a-service is a real thing you can buy, some variants have live chat support to receive payment, and we routinely see new versions with bugfixes and feature-adds. One of the last major flaws in ransomware, the inability to enumerate non-mapped network shares, was overcome in the latest Locky build that calls WNetOpenEnum() to attempt to traverse every share on the network.

For several years, the endgame was more abstract. Hit the PC with your rootkit, join it to your botnet, sell botnet access to spammers for a fee. Now they can cut out the middle man and have less overhead, since there’s not a need for constant command-control oversight. It’s a path to riches hampered only by the still-high knowledge barrier to acquire and send bitcoin. And by affecting the user’s files, rather than a popup about the FBI or TotesLegit AntiVirus which can simply be fixed by backing up the data and nuking the PC, you’ve got them at your mercy.

This is going to get worse way before it gets better. You’ll see builds that try to invoke APIs for popular cloud storage providers to delete the versioning. They’ll find ways to avoid taking ownership of a file to quickly spot the vector of infection. While it’s almost impossible to be truly proactive to effectively block ransomware, there are things that can be done.

  • Avoid mapping your drives and hide your network shares. WNetOpenEnum() will not enumerate hidden shares. This is as simple as appending a $ to your share name.
  • Work from the principle of least permission. Very few organizations need a share whereby the Everyone group has Full Control. Delegate write access only where it’s needed, don’t allow them to change ownership of files unless it’s a must.
  • Be vigilant and aggressive in blocking file extensions via email. If you’re not blocking .js, .wsf, or scanning the contents of .zip files, you’re not done. Consider screening ZIP files outright. Consider if you can abolish .doc in favor of .docx which cannot contain macros.
  • Install ad-blockers and script-blockers as standard loadout. Drive-by malware is out of control right now. Cut off the vector of infection. I use uBlock Origin which is easy to disable case-by-case and offers niceties like element blockers.
  • Install the old CryptoLocker Software Restriction Policies which will block some rootkit-based malware from working effectively. You can create a similar rule for %LocalAppData%\*.exe and %LocalAppData%\*\*.exe as well.
  • Stay up-to-date on the latest ransomware news, how they operate, and what the decrypt instruction filenames are. These can be added to file screens with FSRM to execute a command to kill the share. Simply disabling the affected user is not enough without also forcing them to log off.
  • Backups. Having good, working, versionable, cold-store, tested backups makes this whole thing a minor irritation rather than a catastrophe. Even Windows Server Backup on a Wal-Mart External USB drive is better than nothing. Crashplan does unlimited versioned backups with unlimited retention at a flat rate, and there’s a Linux agent as well. Hell, Dropbox does versioned backups. Get something.

Ransomware has evolved a lot in just a couple of years, and the end is nowhere in sight. Get your defenses up, and know the enemy. There’s a lot less heartache doing the prevention before you’re hit than after.


As I alluded to in my last entry, I tend to become fairly worthless if I miss self-imposed deadlines, even when they’re for things that really never needed to be on a deadline. Sometimes I can get around it by using the concept of “updated wheneverly.” On the bright side, I function pretty well in that setup. A significant problem, though, is that I end up with a lot of projects, all updated wheneverly.

In no particular order, here’s some of them:

Funcrusherpl.us – I overreached on this one initially and kind of got stung by a shitload of work. I got some good encouragement to get back into this by Ander Other, and it’s kind of fun to follow along with the release cycle.

bluesoul.me – Hey, I just launched this one! IT articles posted wheneverly. Sometimes the inspiration hits at work and off you go.

imissgrantland.com – This is one of the smoother launches I’ve ever had. Totally automated service that lots of people are enjoying. Those are ideal for me, people keep enjoying it and I don’t have to do a damn thing. Damn shame that Kimono is gone.

iskbook.com – This did technically work, but it needed a little more automation, and more sports offered. This was, for the uninitiated, a sports betting site playable only with the in-game currency of EVE Online. A related site that I wanted to get going, papersportsbook.com, is a betting site where you bet play money and see how well you do.

ogregamelabs.com – Great idea at the time. Unfortunately it takes way more free time than I actually have to do it in the way I envisioned.

statsonstats.net – This one is going hand-in-hand with a deeper education in statistics, as they can be applied to the NBA. The competition, though, actually went to school for this shit. I think I’m writing it off.

tagpro.me & next.tagpro.me – One of the cooler things I ever built. I’ve got probably 10 pages of post-mortem thoughts. The site was just too pricey to keep going and the code was a bit of a fucked mess. When Tagpro Next comes out, I’ll be looking at the changes to the API and seeing if it’ll make for an easier time with tracking stats, and if so I’ll launch next.tagpro.me on the Laravel framework.

thelegendofmax.net – Can you believe those motherfuckers are still squatting on the .com nine years later? Assholes. I told myself I would retrofit the look and feel of tlom.com to WordPress. At this point in time, it doesn’t serve much of a point. There were a lot of good times, or at least quality distractions, in those 03-04 days. That was the heyday. But I don’t think it would have the same sort of fun carefree thing going, even if that whole crew was still contributing. I don’t know. I’d have to toss it around with them.

@O5_Command – A Mafia bot, written in Perl, that’s used on IRC. I actually did some nice cleanup work on the bot for not really knowing any Perl. But there’s a lot of stuff that needs to be done still in the name of usability for the bot administrator.

@Shaqtus – A python module for a different IRC bot, that scrapes basketball-reference for stats. It’s brittle as all get-out but that happens on free projects that needs scraping.

@Lumberjack – A logging bot for, you guessed it IRC, with a web interface with ACLs per-user, per-channel. This was actually done twice, with two entirely different platforms, and both times it was defaced. Horseshit.

bearpuncherpri.me – shrug.txt

You’ll notice one thing all of those things have in common. They don’t make any money. That’s like eleven different domains and projects, not even counting this one, that don’t provide a penny. I have a couple that could potentially make money.

Ransomware training as a service – The Hidden Tear project was noble but quickly turned for evil. I’m teaching myself Visual C# for this one, and it’s got the best chance of anything I’ve come up with to make some extra money.

Sysadmin Screencasts – I have a big old list of topics to cast, I’d really like to figure out a way to monetize the process as it will likely be very, very time-intensive. Needs more time to think it over.

Papersportsbook.com – Good chance I could get affiliate links to actual sportsbooks and gambling sites. It also seems like potentially the most fun right now.

This post doesn’t serve much of any purpose but to help re-center what I want to do next and fill out my GTD Actions. Sorry about that.

Building a Skybot reddit module.

Perhaps I’ll update this with what’s been going in my life if there’s any interest. Anyway, I’ve been working with python and with a little help from /r/redditdev I designed a module to check regex (in this case, from IRC chatter) for a link to reddit and go get metadata about the link. This is for Skybot on Python 2.6 or 2.7.

import json
import urllib2
import time
from util import hook
import re

reddit_re = (r'.*((www\.)?reddit\.com/r[^ ]+)', re.I)

def reddit_url(match):

jsonlink = match.group(0) + '.json' # retrieve JSON-ified version of link
req = urllib2.Request(jsonlink)
req.add_header('User-agent', 'Python/Putyourbotnamehere-1.0') # Reddit wants us to use unique user-agents. OK.
response = urllib2.urlopen(req)

data = json.load(response)
submission = data[0]['data']['children'][0]['data'] # Dig down to the relevant bits.
self = submission["is_self"]
if self == True:
url = 'http://redd.it/' + submission["id"]
url = submission["url"]
title = submission["title"]
score = submission["score"]
author = submission["author"]
timeago = time.strftime("%b %d %Y %H:%M:%S", time.gmtime(submission["created_utc"]))
comments = submission["num_comments"]
return '%s - \x02%s\x02 - posted by \x02%s\x02 %s GMT - %s points and %s comments' % (
url, title, author, timeago, score, comments)

Resolving VMs not getting a DHCP address from a DHCP server VM.

I’ve been slacking in keeping the blog updated, I’ve started several new projects and work has gone from 25-30 hour weeks to constant 40s. I’ve taken some time for self-enrichment by setting up a PowerEdge Server as a virtualized test lab using Hyper-V Manager and SCVMM 2012 on Server 2008 R2. I am trying to get away from using Small Business Server and actually work on breaking out the server services to dedicated virtual servers. The first one, by necessity of wanting to use workstations in a real-life use case, was a DHCP server on a Server 2003 R2 Standard VM.

WARNING: I am a pre-MCSA know-nothing with regards to virtualization. My first time messing with Hyper-V was about two weeks ago, so if this is common sense to most of you, that’s why.

It appeared to be functioning properly, but I had a problem. If my workstation VM’s NIC was pointing to an External virtual network, it would not get a lease. If I set the IP statically, it could surf the Web and do all the stuff it needed, but if I set it to get a dynamic IP it would never contact the DHCP server. If I set it to an Internal virtual network, it would get a lease, but couldn’t get online. If I added a 2nd NIC and made one Internal and one External, I was no better off as I still had to set the External IP statically.

The issue lies in how the virtual NICs work in relation to the hierarchy of virtualization. When you create an External vNIC, it unbinds everything from the physical NIC but the VM NIC platform, and creates a new NIC on the Hyper-V server. This is important, because that External vNIC is what determines the connectivity of any VMs that try to use it. The DHCP server is virtualized, and also using that External NIC. Once I set up DHCP Server on the host machine, and set the External vNIC to get a dynamic IP, the workstation was able to get a lease, see the other computers, join the domain, and so forth.

If I get really bored in my testing, I will set up a DHCP Server VM with it’s own Hyper-V server and build a workstation on it, and see if it can get a lease that way, to prove whether it’s a hierarchical problem or, more likely, an error in my network configuration.

This could also likely be resolved by assigning the DHCP server its own NIC, but I only have 2 NICs on the server right now and this setup will work on a one NIC configuration.

Ogre Game Labs: A Proposal

(This is intended for one person, really, but I thought I’d put it on here so you all could see a new project I’m wanting to work on and maybe express some interest.)

Myself and several other members have a particular interest in designing games, and enough new online tools have emerged recently that I want to pursue the thought of an extension of the OGREs. The Ogre Game Labs would be something a little different from a traditional chapter, as membership in it would be as temporary or permanent as the OGRE choosed, though they would need to first be OGREs to make use of the Game Labs.

The Ogre Game Labs has a few immediate goals and a few stretch goals. Immediate goals are:

  1. Provide a resource for game designers to get support in the designing of their game, through (mostly online) playtesting, consulting with other game designers, working with people that have experience in online game designing tools such as Vassal (www.vassalengine.org), Roll20 (www.roll20.net), and Magic Workstation (www.magicworkstation.com).
  2. Provide a way for gamers to get involved at the ground level of new games and designers/design teams. They can find a game concept that’s of particular interest and volunteer to playtest games, or find a group with a similar schedule. One resource will be that all OGREs will be able to set their availability by day of the week, and this will be public. By joining the Game Labs you opt-in to being contacted by designers who are available when you are.
  3. Answer some basic questions on copyright law as it pertains to card, board, and video games. Not legal advice but links to useful resources on how you are protected (and not protected) as a game designer.

Some stretch goals are:

  1. Provide connections to artists, graphic designers, distribution chains, game stores that would do further playtests. Make it a real one-stop place for a game designer no matter how far along the project is to completion.
  2. X-TREME STRETCH GOAL: I’ve toyed with the idea of designing a modular game engine in HTML5. We may be able to turn some games into something that the public can play, and if there’s enough selection of quality games, turn it into a monthly membership service.

I’m fairly flexible on the overall structure of the Game Labs, and I think people would take on some self-granted titles. Jesse Schell’s excellent “The Book of Lenses: The Art of Game Design” is very adamant about this fact: To become a game designer, all you have to do is say you are one. The games will come later, but it’s important to take on the role first. So there are some positions that anyone would be able to take (with no limit), and some permanent positions.

Director – Likely myself in the dual role of webmaster, responsible for the overall direction of the Game Labs. Catches all the requests that slip between the cracks (and assigns new positions if enough slip through the same crack).
Head of Development – The member with the most experience in gaming and rule systems, available as a last-level resource to ask questions of all sorts on game design. A sort of “Resident OG” position equivalent to a chapter’s Senior DM.
Project Coordinator – Provides designers with new subforums and blogs for their project, and passes on other technical requests to the webmaster. Also responsible for answering questions on the new designer process.
Chapter Liaison – One member from each OGRE chapter that want to use the Game Labs should have a Liaison that matches people up with projects, and helps raise awareness of the Labs as a tool open to all members.
Design Head, (game) – Self-granted position once a game is far enough along that the designer needs to start recruiting for playtesting. Multiple people can be heads of the same project if it’s a team, and team accounts can be made to speak as one voice. One person can be Design Head of multiple games.
Designer – Position granted on entry to the Game Labs. I considered making “Playtester” another option on entry but if you playtest, you are helping design, so you’re a designer first.

That’s just a list I came up with while writing this so I’m sure some things aren’t covered but it should give an idea of the structure and day-to-day operation. Chapter Liaisons, the Project Coordinator, the Head of Development and Director would make up a Board of Directors that would vote on issues every so often (Not sure how often, and it seems silly to decide on a timeframe before the project goes live.) I’m open to suggestions on term lengths and the like, but also bear in mind this is going to be almost exclusively online, so voting will be forum-based before a deadline (and likely count as an abstention if not submitted).

I can have a forum up at ogregamelabs.com within the week you all decide you want to go ahead with it. I’m excited to push this idea forward and maybe even make the OGREs known as a think tank for up-and-coming designers. I’m available for questions via email at daniel.tharp@gmail.com.

How to install Windows XP SP3 on Mac OSX Mountain Lion and get drivers, too. [updated 3/2/16]

This has been far and away my most-read article ever. Thanks for reading! If this saved you a couple bucks of your time, consider donating via Paypal or via Bitcoin to 16FCWbn1wSpgn3a5mcjXRAYGYRQ5MW3qv5.

I considered various triple and quad boot options for my new (to me) MacBook Pro, but eventually decided on a simple dual-boot, OSX Lion and Windows XP.  If you’re reading this via a Google search, you likely ran into some problems too.  If you have been trying to do this without involving Boot Camp at all, bear in mind that even with all the drivers technically working you’re not going to be able to do things like use the multi-touch trackpad, use the function keys on the keyboard, etc.  Don’t worry though, this is an end-to-end guide on what to do to get XP running on a machine running Lion, complete with download links.

5/2/2012 Edit: From the comments I can pretty safely say this doesn’t work on  2011 Macbook Pros. Sorry, it’s likely due to them using new hardware not accounted for in the Leopard driver pack. If you can find a way to make it work, please leave a comment.

9/7/2012 Edit: It sounds like this works for Mountain Lion as well, as it should. This should work for all OSX releases for the foreseeable future, but will likely not work on newer hardware. We’re using hardware profiles from Leopard, and many chips and cards used since simply didn’t exist then.

3/2/2016 Edit: Hoo boy, this thing still gets traffic. Since Windows XP is no longer supported, and is a positive magnet for malware now, I really don’t recommend you do this anymore. Only if the XP installation is not going to access the Internet. However, the links to the driver packs and such aren’t going anywhere. This probably won’t work on anything newer than 2010 gear.

Things you will need:

  • Bootable Windows XP disc.  I’m using a TechNet XP SP3 disc, but any full, non-OEM option should work.
  • Access to Disk Utility from something other than your active partition.  This can be via your Mac Install Disc, Install USB drive, etc.  I had a Lion USB drive.
  • Boot Camp 2.1, i.e. the version that shipped on Leopard retail discs.  Use Leopard install disc 1 or download it here.

Quick Guide:

  1. Use Disk Utility from your bootable media, partition off however much space you want to use and make sure the format is set to “MS-DOS (FAT)”  (which is actually FAT32)
  2. Install Windows  on your new partition.  You can choose to re-format your partition as NTFS if you want, which is more efficient than FAT32 but only allows read access to the Windows partition from OSX, where FAT32 is read/write.
  3. Download the Leopard version of Boot Camp here. (same link as above)
  4. Run setup.exe, don’t bother trying to drill-down into the Drivers folders manually.  The setup catches it all.
  5. Reboot; if you have sound, you’re finished!  If you don’t have sound,  go to Device Manager, expand System Devices, disable “Microsoft UAA Bus for High Definition Audio”, then uninstall it.  Verify Realtek High Definition Audio is also gone from Sound, video and game controllers (disable and uninstall if it is still there).
  6. DO NOT REBOOT, run WDM_R268.exe provided in the driver 7z file or here.
  7. Done, reboot to finish audio driver install.

Step-by-step Guide:

  1. Boot to your OSX bootable media by inserting the disc (or plugging in the flash drive) and holding down the Option/Alt key once you hear the startup chime.
  2. From the Install Menu, choose Disk Utility and hit continue.
  3. Click on your hard drive, usually the top-most item in the list of devices, and in the main pane hit the Partition button.
  4. On a default Lion install, it takes up the entire hard drive.  Provided you aren’t using all of it, select the partition and click the + button beneath it to create a new partition.  Name it what you want, set the size in GBs that you want to give to your Windows installation (I set mine to 120 out of 500, so I have room for XP-friendly games.).  In the details on the right side of the main pane, change the format of your new Windows partition from Mac OS Extended (Journaled) to MS-DOS (FAT).  This is actually FAT32, not standard FAT with it’s 4GB file limits and whatnot.  FAT32 has a downside here in that it makes 32KB clusters, which can be wasteful at large sizes (partitions above 32GB).  The advantage to formatting as FAT32 and not NTFS (which is possible later on) is what you’ll have read AND write access to your Windows files when booted into OS X.  NTFS is read-only to OS X.
  5. When everything looks correct, hit Apply and wait for your partitions to be modified.  If you get an error at this point, select the Mac partition (not the hard drive itself), select First Aid (losing your changes to the partition table, unfortunately), then hit Repair Disk.  If you still have errors, repeat this step but choose Repair Disk Permissions.
  6. Once your partition is set, put your Windows XP disc in the Mac and reboot, again holding down the Option/Alt key to choose your boot device.  You should see the typical Windows XP setup process begin.  After a few minutes of loading, you should be able to begin the installation.  Hit Enter to begin the installation and F8 if you agree to the license terms.  At this point, you should see your Windows partition, two [Unknown] partitions and possibly some unallocated space.  Make sure you install to your newly created partition.  You’ll be given the option to format to NTFS.  Again, NTFS only allows Read-Only access to your files from OS X, but is more efficient space-wise than FAT32, which you can read and write from in OS X.  Make your decision according to your needs and proceed with the installation.
  7. If you’re used to installing Windows XP on computers, bear in mind this is not an unattended installation; every time the machine reboots you’ll need to be there to hold down Option/Alt and tell it to boot to your Windows partition (NOT the disc, which would start the setup process over again). So hold your computer’s hand through the installation process.
  8. When setup finishes, you now technically have a working dual-boot setup.  But there are a lot of missing drivers and a lot of things you won’t be able to do.  The big one would be your lack of network drivers, which means no way to get online to get your other drivers.  So now grab Boot Camp 2.1, with it’s sweet cache of Windows XP drivers, here.  You will need 7zipto unpack it.  The files in that archive are copied directly from my Leopard Install Disc and 7z’ed with Ultra compression.  Be patient.Again, download the driver pack for getting XP working on Lion here. Get 7zip here if you don’t have it.
  9. Once you have the driver pack downloaded and unpacked to your XP installation, run setup.exe to begin the Boot Camp installation process.  It will ask to install the Apple Software Updater first, which I went ahead and did because iTunes is going to install it anyway.  Watch as the Boot Camp installer finds and installs all the drivers for you.  Once it’s done, it will ask to reboot.  Don’t forget to hold down Option/Alt to get back in when it does.
  10. When XP comes back up, you may find that your video looks like it didn’t install.  On nVidia systems, Go to Start -> Control Panel and double-click nVidia Control Panel.  It should immediately ask to adjust your resolution.  While you’re in here you can make any changes to the color, etc. that you need.
  11. Test if you have sound by clicking the speaker icon in the system tray on the bottom right, dragging the volume slider all the way to the top and releasing.  You should hear a tone.  If you do, go to Start -> Control Panel -> System -> Hardware -> Device Manager.  If there are no exclamation points, red Xs or anything of the sort then you’re done, enjoy your XP-on-Lion goodness.
  12. If you do not have sound, Boot Camp has probably installed a Realtek audio driver that is incompatible with Service Pack 3 of Windows XP.  Go to Start -> Control Panel -> System -> Hardware -> Device Manager.  Expand System Devices by clicking the + next to it, find “Microsoft UAA Bus for High Definition Audio” in the list of entries, right-click it (on a Mac laptop, you can now right click by placing two fingers on the trackpad and clicking the mouse button over what you want to right-click on) and click Disable.  It will ask to confirm you want to disable it, click Yes.  Right-click it again, and click Uninstall.  Hit yes to confirm uninstallation.
  13. In the big driver download there is a file in the root called WDM_R268.exe.  If you didn’t download the pack (because you already had Leopard Discs, for example), download just the audio driver here.  Run that exe and it will install working audio drivers.  You should hear the “fwop” of a Windows message in the system tray on installation saying a reboot is needed to complete installation. At this point, everything should be working on your system.
  14. You’re done, Boot Camp now sits in the system tray as a gray diamond.  You can use it to determine which OS gets run by default.  If you see a boot selection prompt when you’re booting to Windows, having you choose between Windows XP and “Unknown boot on drive C” or something to that effect, go to Start->Control Panel->System->Advanced->Settings under Startup and Recovery.  Make sure Microsoft Windows XP is your default Operating System in the dropdown list, and uncheck the box immediately below it that says “Time to display list of operating systems”.  I leave the second box checked in case I do want to boot to Safe Mode after a loss of power.

Hopefully that’s all it takes to get you up and going, please comment if this helped you out, or if this doesn’t work for you (likely if you have a 2011-2012 machine).

9/7/2012 Edit: Commenter Mark writes: “I can confirm that I have boot camp installed with Windows XP and Mountain Lion. Everything is running smoothly on my late 2009 24″ iMac. The only problem I experienced was with windows update installing an incompatible nVidia driver which prevented my wired ethernet from working. Rolling back to the previous driver cured this and hiding the offending updated driver from windows update should prevent future issues.”

Daniel Tharp

Read My Lips, No New Fart Apps

I took the plunge, bit the bullet, followed the crowd and clichéd all the clichés. I bought a Mac, specifically a MacBook Pro from Late 2008. I’ve already pre-emptively deleted a paragraph that sounded like gushing because I’m honestly very impressed with OS X, moreso than I expected to be.

Anyway, the reason I’m writing this post is that I bought this thing to write iOS apps on, and I’ll be sharing my experience learning, debugging, testing and (probably) swearing with all of you. I hope it is informative to some of you, because I’m coming from a background in function-oriented PHP. It has done everything I needed it to do, and while OO programming is definitely cleaner, more secure code, I have seen little appeal in such a mental overhaul of my approach. So I approach this with no small amount of trepidation, the tutorials I’ve read so far haven’t really clicked with me yet, and I still feel out of my depth. I have one app I’m going to be working on right away, the series of posts will be mostly unfiltered, I will be learning, breaking things, and fixing things from post to post, so you get a feel of what I’m going through; my reasoning for this is that I know I’m not the only one making this transition from function-oriented PHP to Objective-C and Xcode.

The first post will be up before Friday, dealing mostly with Xcode and my understanding of things going in. I’m also revealing my studio name (obviously an important step in being an iPhone millionaire, much like how “writers” will have a grand story in their head, but when you ask “oh, how far along is the book?” they respond with, “Well, I haven’t actually written anything yet, but that part’s easy.” For the record, I don’t care. My studio name is awesome and you’ll just have to deal with my hypocrisy.

The Toolbelt: Some of my most-used code snippets for PHP, MySQL, HTML and CSS.

I’ve meant to work on this for quite a while. These are some of my most used code snippets to shorten a process, handy workarounds, pieces of code I need all the time or other such things.

HTML: The Meta Redirect

Use case: You need to redirect someone to another page, and don’t want to bother notifying them.

Code: [code][/code]

Advantages: Silent, works cross-platform, timer can be set (in whole seconds) by adjusting the 0 in content, will work in the body even though it’s a meta tag.
Disadvantages: Breaks back buttons.

PHP/MySQL: Quickly process and sanitize form data.

Use case: You’ve just accepted a form and want to easily work with the data, and escape the data to prevent SQL injection attacks.

Code: [code]foreach($_POST as $key=>$value) { $$key=addslashes($value); }[/code]

Advantages: Saves a lot of repetitive entering of $_POST[‘element’]. Instead you just use $element. Also escapes the data early on so we don’t forget further along in the code.
Disadvantages: You create a lot of variables instead of one array. Your array isn’t actually destroyed, just copied. The idea is that the backend is working primarily with this POST data so making a lot of variables isn’t an unwanted thing.

PHP/MySQL: Save an if statement on every mysql_error() check.

Use case: You need to use mysql_error() function to handle errors in your SQL statement.

Old code: [code]$result = mysql_query($query);
if(!$result) { die(mysql_error()); }[/code]

New code: [code]$result = mysql_query($query) or die(mysql_error());[/code]

Advantages: Reduces risk of typos breaking your page, cleaner.
Disadvantages: No known disadvantages.

PHP/MySQL: One standardized method of DB querying.

Use case: You want to get in the habit of one naming scheme for your MySQL queries, and don’t want to go the OOP route.

Code: [code]function doQuery($query) {
$result = mysql_query($query) or die(mysql_error());
return $result; }

$q_descriptivename = “SELECT * FROM table WHERE 1”;
$descriptivename = doQuery($q_descriptivename);[/code]

Note: No advantage or disadvantage here, I just thought I’d share the way I do my queries. I usually have a functions.php file with things like doQuery, doConnect, and so forth. I then make the file a require_once() in my header.php. There are more efficient ways to do it via object-oriented code, but there are certainly less efficient ways too.

PHP: Regex out non-numerals from a phone number, then put them back for display purposes.

Use case: You have a form input for a phone number, and want to be guaranteed it works in your database. If you’re trying to optimize and want to use a CHAR(10), or just want a unified dataset to work against. Really it’s common sense to have all your data be uniformly stored here.

[code]$phone=preg_replace(“/[^0-9.]/”, “”, $phone); // strip non-numerals
if (strlen($phone) == 7) { $phone = “505”.$phone; } // if the user was too lazy to add their area code, add the expected one. Handle this how you like.

$disp_phone = preg_replace(“/^(\d{3})(\d{3})(\d{4})$/”, “($1) $2-$3”, $phone); //present it in the standard (123) 456-7890 format.[/code]

Advantages: Regular expressions take a lot of possible entries and catch them all. One-line solutions are always preferable to a switch or some such.
Disadvantages: The code above is a very crude handling of too few numbers, but the regex can be tweaked to accommodate that or you can do it via Javascript.

CSS: 3-column div-based website with a “sticky footer”

Use case: You find tables too outdated and confining, and would rather use divs and CSS.

Code: 3colstickyfooter.css

Note: The “sticky footer”, where the footer is on the bottom of the page even when the rest of the content doesn’t reach that far, is a surprisingly tricky behavior to get right. You can see the result here. Notice how the footer stays stuck to the bottom of the window as you resize it.

PHP/CSS/HTML: Blind-friendly, captcha-free, spam-fighting input field.

Use case: I had a client that was opposed to captchas, yet one of his forms was constantly hammered by spammers and filled his mailbox. Thus I designed a hidden text input field that spambots fill out, blind users are audibly instructed to leave empty, and sighted users never see.

Code: [code]HTML:

If you’re human leave this blank.

CSS: tr .robotic { display: none; }

PHP: if(strlen($_POST[‘url’]) > 0) { die(); }[/code]

Advantages: The home-brewed nature of this solution has resulted in a 100% decrease in spam getting through. We thwart the spammer by knowing they don’t respect CSS; they just look at a page as raw HTML and fill in data wherever possible. Naming the field “url” guarantees the spammer is going to put a link in it, and then the PHP sees there is data in the field and silently rejects it. Just use a different input name for your real URL field. This also eliminates false positives and frustrating re-validation attempts by end-users that can’t read the captcha.
Disadvantages: No known disadvantages.

Pie to Finger Ratio

I thought it would help me focus if I wrote down all the web projects I’m working on now.

Project Havana: Lot of work to go, got some pretty jQuery animations going on but very little content. Lot of data entry to go, but I feel like this project has the best odds of being monetizable. (Is that a word? It is now.) Day-to-day investment of time seems like it could be quite high for a while.

Project Xenon: Data entry’s done, and hell a lot of the code from Project FAST is reusable. jQTouch is still eluding me with regards to passing data across the POST in PHP and still getting those pretty animations. I need to buy that peepcode screencast and get it over with. If I had a week to knock this out it would be donezo. Not much oversight needed once the code is stable, especially when I’m not expecting much of an audience.

Ogre Game Labs: Pretty much from scratch. I think the stuff you learn from Project Havana will pay off here, because you’re gonna want that asynchronous data transfer. It’s a must, actually. So get Havana up and going, spread the word in the channels where you’ll get an instant audience. Then re-evaluate how much of this you can do. Day-to-day is a real wildcard, as is the eventual size of the audience. Main competitor is only about 5,000-6,000 registered users but up to 200 concurrent sessions. That’s serious stuff, but we’ve got a level of flexibility that they don’t. I think.

Ogre Lair: Operational. Needs customization and getting moved to the correct domain. I like that I’ll be able to hand the day-to-day of this one off.

Paid job for IPC: Mostly data entry and their calendar left.

Paid job for AUMC: Done? No callbacks so I think they’re done.

Paid job for NMBA: Just the one associates page left, knock that out and get it off the whiteboard.

Project CSA: Goodness this one is never gonna end. Downside of working with the end-user on a daily basis is the scope of work is always changing. Need to figure out a plan of attack, and where to start with the code. You have the existing WO tool done, maybe that can be retrofitted.

Eight balls to juggle at once is about all I can stand, I need to knock these out. Can we order them by ETA?
AUMC (done?)
NMBA (one page? come on)
Ogre Lair
Xenon (just in no rush to do this one)
Ogre Game Labs