May 11

Integrating XAMPP’s web root (htdocs) and Dropbox

This is Part 1 of a short series of posts relating to getting a Windows-based web development environment humming with the following development tools & technologies: XAMPP, PHP, CodeIgniter, Python, Django, WordPress, MySQL, SQLLite, SQL-Server, NoSQL, jQuery, node.js, HTML5, mobile dev, ASP.NET MVC, C#, Visual Studio, XAMPP, DropBox, Mercurial, and TortoiseHG

Goals of this series

  1. Present how I set up a Windows-based web dev environment that’s a mix of MS and open-source tech/tools, and is easy-to-use, low-maintenance, and portable between work/home/whatever…
  2. Report on my progress through the development of various apps with related analysis, design, dev, and integration anecdotes, etc.

I’m starting this series ‘in media res‘:
I’m mostly set up and dev work has begun. I’ve already recently built a few new sites using WordPress OR PHP, CodeIgniter and MySQL.
I already know ASP.NET MVC and PHP pretty well, and all the other tech is familiar — except Python/Django, which I just started learning in February.
I’ll use ASP.NET MVC and Python/Django on other stuff, later.

The home-workstation is a Windows 7 tower that’s decently powerful:

  • Intel Core 2 Quad @ 2.4Ghz
  • 4GB RAM
  • nVidia GeForce GTX 460
  • 1TB of HD (Raid 0)
  • OS on a separate 80GB SSD
  • Windows 7 Ultimate x64 (kept up-to-date with Windows Update)
  • TortoiseHg 2.0.4

My Laptop is decently powerful for dev:

  • Lenovo T400s
  • Intel Core 2 Duo @ 2.53Ghz
  • 4GB RAM
  • crappy Intel videocard
  • 120GB SSD
  • Windows 7 Ultimate x64 (again, relatively up-to-date with Microsoft Update)

Key Dev Tools (all machines/environments):

I won’t bother to explain what all these tools are and what they do, the focus here is how to get them all working together. if you need detailed info on them, Google is your friend…

Anyhoo, that’s the recap, back to the subject at hand

So, I have XAMPP and Dropbox both installed on my D: drive.

  • XAMPP is located at D:\XAMPP\
  • and DropBox is at D:\Users\[userName]\Docs\Dropbox\ (don’t ask…)

I wanted to have my XAMPP-based work shared between systems, so I can work seamlessly on them at home, work, when I’m at your place, etc. Plus Dropbox would give me sorta-kinda disaster recovery and limited version control (I actually use Mercurial & BitBucket for version control, as you will see later in this series, but this is nice extra piece of mind).

Earlier experiments with moving the entire XAMPP folder-tree/install into Dropbox had not gone well: permission issues and general app ‘crankiness‘ between them turned me off that idea.

So I decided to try a symlink from XAMMP’s web root (/htdocs/) to a folder inside my Dropbox tree. This would be almost ideal, the only code/settings of importance to me not then replicated in Dropbox would be Apache’s conf files and my Windows host file (more to come in this series on those 2 issues).

Long story short, this worked like a charm and I now have the folder in my Dropbox.

So here’s how I went about it:

  1. Shut down XAMPP and double-check it is all closed
  2. Backed up everything that I was going to move…just in case…
  3. I added a new folder to dropbox: \dev\
  4. Then I dragged D:\XAMPP\htdocs\ to \dev\, resulting in: D:\Users\[userName]\Docs\Dropbox\dev\htdocs\
  5. Then, opened a command window, and used Micosoft’s mklink to create a Directory Junction, so that XAMPP’s Apache will not ‘know’ that I’ve moved the folder. Here’s the command I used: mklink /J “D:\xampp\htdocs” D:\Users\[userName]\Docs\Dropbox\dev\htdocs\”
  6. The above command ran successfully and then I started XAMPP back up, and started Apache
  7. Opened a browser, tried a few of my local dev sites — BAM! They were all fine. Cracked a cold one and drank the sweet taste of success…

To be honest, the first attempt to use mklink failed because I didn’t first move the \htdocs\ folder into the Dropbox tree. mklink expects and empty folder for it’s first param. Not moving the folder first resulted in this cryptic mklink error message: “Cannot create a file when that file already exists.”
A bit of Google-fu resulted in this helpful link: Complete guide on syncing XAMPP and MAMP using Dropbox. It’s a good read as well.

Also, this blog post, while not directly relevant, was also related and describes similar inspiration and ideas as my own: Develop Anywhere with Dropbox, NetBeans and Xampp

Note: it is OK to make a link (via mklink) to a folder that is not empty.


May 11

Pour-over coffee

So…I’m a coffee nut. I’m in for the whole experience, taking what seem like silly amounts of time to research, purchase, and test coffee and coffee gear. Trying different combos of merchants, gear and coffee — I really do spend too much time on this. But have no intentions of stopping.
Never mind the amount of time I spend making & drinking the stuff…

Anyhoo, we’ve own lots of coffee makers (a couple regular drip machines, a Starbucks espresso maker, an Aeropress, multiple French presses, and a 1-cup Swiss Gold pour over).

But it’s pour-over coffee that has a hold on me lately. I like the simplicity and elemental nature of it. And the easy cleanup.
Above those considerations though, is the powerful, clear coffee taste from pour-overs — that’s what I like best.

So, my next purchase will be a Chemex pour-over coffee maker. Check it out in this video if you are so inclined:


Posted via email from Lance’s miscelanny

Apr 11

What is being creative?

I like this: Creativity…

the ability and urge to make something of value

What is being creative? from Kristian Ulrich Larsen on Vimeo.

creativity is no longer a word reserved for the musician or artist
it’s something you can find in anyone
it’s the ability and urge to make something of value
it can be big
it can be small
but making something new
something different
something that surprises
something that makes you think
something that makes you smile
it’s making something beautiful
it’s telling a story
it’s telling your story
expressing yourself
it’s about being passionate
it’s creating something that other people can use
sharing your creativity
it’s realising that there isn’t always a right way or a wrong way of doing things
and that there’s not always a correct answer
only the answers that we create
but common for creativity is that is comes from inspiration
inspiration found in the world that we live in
and the people we live with
it’s found in what we share with them
building on what’s given from the diversity of people’s thoughts and perspectives
so try and drop the assumption that you know how to do things
and already know the solution
stray away from the direct path
take risks
don’t be afraid to make mistakes
because it’s only from the mistakes that we learn
and it’s from the mistakes that the really interesting things happen
we may not always create or invent
but we always learn when we try

Kristian Ulrich Larsen

Posted via email from Lance’s miscelanny

Apr 11

HA, I am vindicated by The Atlantic

“…want to succeed in business, don’t get an M.B.A. Study philosophy instead.”

“I told ya so”, 😉

Posted via email from Lance’s miscelanny

Mar 11

Deal With It

Ace Ventura: Deal With It

My current favorite image…

Posted via email from Lance’s miscelanny