walkah: geek

my geekery
20 Aug 2010

Local development for external APIs

Lately I have found myself doing a lot of development against external APIs, several of which require those services to be able to access my dev site directly. Traditionally, I've set up my dev sites on a public server (usually my personal VPS), mirrored the site locally, and used rsync to push incremental changes from my local machine to the server.

This is a pain for two reasons:

  1. It means I have an extra step (to rsync) after each change. Yes, it's the same command over and over, but it gets repetitive. Also, if I forget, I spend a few minutes trying to figure out why the change I just made doesn't appear.
  2. I'm also left with old dev sites (that I generally forget about) out on the public web - generally not getting proper attention for security updates, etc. This leaves my VPS open to attack.

I also spend a lot of time tweaking my local environment to be just-how-I-like-it(tm).

Recently, I had an idea that, in hindsight, seems obvious. However, in talking with a few people, it seemed just novel enough to warrant the high bar of intellect that is a blog post. So here is the magic:

What you need:

  • A wildcard DNS entry (i.e. *.home.example.com). I'm lucky that my home ISP allows me to have a static IP address, but a DynDNS or similar account would also work.
  • A linux/mac computer attached to your home/office network that is not currently running a web server (i.e. port 80 is unused) - preferably connected via ethernet. I happen to have an old mac mini that serves as my "media server" at home that I'm using.
  • Ports 22 and 80 forwarded from your router to the aforementioned computer. (This is left as an exercise to the reader).

The "magic":

Given the above, the rest is really quite simple (and perhaps obvious to some). A simple ssh port forward does the trick. Here's the command I use:

ssh root@home.example.com -R 80:localhost:80

For the unfamiliar, that says ssh into home.example.com as root and send all the traffic coming to port 80 at home to port 80 on my localhost.

Voila! Now all requests to home.example.com will come to my local server and I can setup vhosts, etc accordingly. Also, if I just end my ssh connection, I no longer have to worry about the big, scary Internet accessing my dev sites.

TODO

I'm not 100% happy about allowing root ssh into my home network, so I may spend a rainy Sunday afternoon and setup an HTTP proxy at home that forwards to something like 8080 on localhost (and perhaps gives a nice "we're not home" message if I'm not ssh'ed in). That way, I wouldn't need to ssh in as root (which is necessary to bind the "low number" port).

If you do much tinkering with remote services (particularly OAuth-based services or webhooks, etc.), I hope this makes life just a little bit easier for you.

2 Mar 2009

the tools i use

I spend a lot of time routinely tweaking various tools and configurations on my desktop environment. Frankly, I think those of us who spend our days in front of a computer owe it to ourselves to make it a pleasant experience. I tend to write about various tricks here, but feeling inspired by merlin's desktop tour, I may try to do so more regularly. Here's a quick rundown of the apps I've added lately:

  • 1Password has had the most impact in terms of daily use. Fix your password habits. Seriously.
  • To stay focused, I've been using using a combination of SpritedAway and Isolator - the former hides apps I'm not currently using, while the latter let's me focus on a single app (usually writing a document).
  • I've been keeping an eye on noisy fans and run-away processes with iStat menus (hat tip: @jjeff).
  • Mail is probably my biggest area of tinkering... I'll try to write up my current setup in more detail, but MailActOn 2 and DockStar are working well for me.

Probably my biggest change recently, is to switch back to much heavier use of emacs... more on that later ;-)

How about you? What are you using to make your (computer) life a little bit better?

19 Jun 2008

G-Drive mini: great for travel

G-Drive miniAs someone who spends a fair bit of time on the road, I've become increasingly paranoid about my backup strategy as well as my general "travel kit". To address both, I made a purchase recently that I'm so in love with I just had to blog it:

The G-Drive Mini from G-Tech is an awesome little portable hard-drive. I got the 250GB, dual interface model and so far it has been wonderful. At 250gb, it has plenty of room to store my Time Machine backups as well as any extra files I (might) need on the road.

It's a really nice looking little unit: aluminum case (that matches my macbook pro), with it's own heat sink. It's quiet enough that I hardly notice it. AND it comes with it's very own leather carrying case.

I'm happy with the new addition to my travel bag, and I'd recommend it for yours as well.

22 Oct 2006

tell me what concerts to see already!

i love live music. i've made sort of a commitment to myself to see a lot more of it. but, here's the thing: i want the internet to tell me when and where the concerts i want to see are.

i think i'm not alone... there are a bunch of "getting close" options. first, is this mashup of two of my favourite sites/services, upcoming and last.fm. this is a good start (apart from the "rough" interface), last.fm knows a whole lot about my listening habits. however, the results are less than satisfactory since upcoming only contains the concerts that people have posted - and, while it's great for tech conferences, upcoming just hasn't attracted bands, labels, etc.

next, i stumbled upon ontour. this is nice - there is actually a dashboard widget that scans your itunes library and matches against upcoming concerts in its impressive (albeit apparently closed / proprietary) list of concert information. my beef here? my music collection isn't actually in my local itunes library. my music collection doesn't fit on my powerbook. truth is, last.fm knows best what i'm listening to these days.

the most complete concert listings still seem to be in local weekly magazines. problem is - at least here in toronto, the two main weeklies: now and eye don't actually export or syndicate their concert listings in a usable format (for a last.fm mashup). hell, i can't even get a feed of new concert announcements. consider that a call out.

apparently, last.fm has had some of the same ideas - their latest beta includes events! the cool thing here is last.fm is pretty good with recommendations - they might actually be able to tell me something *new* to see. time will tell how complete the listings will end up being. i am hopeful, though, since last.fm does actively recruit music labels.

am i missing something? where else are people watching online for local concert listings?

tags:
19 Sep 2005

talk like a pirate!

ahoy! in case you're not part of the perverse corner of the internet that knows... today is talk like a pirate day. to honour the occasion - the posts in this blog have been re-written in "pirate speak".

of course, i didn't actually re-write anything. the magic, of course, is all done by drupal, and fellow bryght guy, richard eriksson's lovely pirate.module for drupal.

yes, it's silly. and yes it will be gone tomorrow :)

tags:
16 Sep 2005

forty three

... as in things, places and now people. let's face it, lists are in and I'm totally hooked.

i've been playing around with the beta-ish 43people (the latest offering from the gang at robot co-op), and I gotta say this just keeps getting better. the sites are clean, elegant and brilliantly tied together. though I knew it was in the works, I got an email today saying that kris knew me. So, I clicked the link, and sure enough, I was logged *magically* using my 43places/things identity and instantly started marking the people I knew.

what's the point though? I mean, at some level - who cares what I want to do (or have done) and where I want to go (or have been). I'll be honest... I'm not sure I really know. But, I find myself bouncing around the 3 sites adding things here and there... and all of a sudden I've got a nice list of things - and start to see others with the same interests, desires, and where they've been, what they've done, who they know etc. What good is that? Well, besides proving once and for all that the Pacific Northwest tech scene is this insanely small, incestuous group of brilliant people that just keep turning out neat stuff... it makes the rest of the world just a little bit smaller.

social software - not pounded down your throat in terms of how many friends you have and how many groups you can get invited to. but, a little more organic. as in - these people are connected to you because they're (at some level) kinda like you. kind of like what I think last.fm is doing with music.

of course, 43* is also killer, 'cause all they're stuff is not only all AJAX-y and slick, but they expose web services for everything. data in. data out. this is where I'd say something about web two point oh, but you get the drift.

tags:
14 Sep 2005

Ajax-based IM: meebo

just picked this up via Om:

Through Ajax, the folks at meebo were able to create a virtual application-like experience within a single web browsing window. meebo integrates a user’s accounts from AIM, Yahoo Messenger, MSN Messenger, and ICQ into a single buddy list that is automatically populated upon signing into the meebo web site. Sort of like Trillian/Adium, but in a browser window.

meebo, eh? well, hey guys... how about some jabber support? i'd love to see an elegant, in-browser jabber client right about... now. so, folks - how about it?

UPDATE: I just noticed over on the meebo blog that they're using GAIM (libgaim, I presume) to connect to the IM networks:

We use Apache and Linux (CentOS) on the servers, and connect to the networks through Gaim

not only is my request possible, sounds like it's in the works :)

tags:
2 Sep 2005

a tale of two macs

one of the things that happened, oh, around 6 weeks ago that i have yet to blog is the fact that i received a mac mini for my birthday. despite having to return my original as a DOA (which is a longer story, and not the point of this post), i'm really fond of the little machine. i'd been longing for a new desktop machine, but it had to be a quiet one. All in all, the mini is an adorable, little-yet-powerful machine (particularly since i do lots of my web development on another box in the closet)- and it's more or less silent.

But, now i use two machines very regularly...

Wait! they're both macs, right? yes, my powerbook and my new mini. so, why not just sign up for .Mac and be done with it? well, that's not my style. i've spent *plenty* of money with apple over the past couple years, that wouldn't help with windows or linux, and besides: i'm a geek

so, here's what i really want/need:

  • My email in both places. check: long ago i switched all my mail to be served via IMAP from my own server.
  • My contacts available everywhere - this sort of works, if you have entered all of your contacts already - because, yes, address book will access your LDAP directory read only.
  • My calendar and (more importantly!) my todos everywhere. here is where the frustration really starts. i really like apple's iCal, and you can very nicely publish and subscribe to calendars not only on your .Mac account, but on any WebDAV server. Or so you would think. wrong you can publish or subscribe. ARGH! are you kidding me? even the alpha-ish mozilla sunbird will 'sync' remote calendars.

Sure, there are other things such as syncing my documents and configuration - but I already use CVS (or svn) for some of that, and don't compose many "documents" per se, so those are lesser issues.

my big complaint is that, i really like the mac tools: but apple (and I know you're listening) why are they crippled? are .Mac sales *that* important to you? why no publish and subscribe for iCal on WebDAV? Why can address book search my LDAP directory, but not edit entries in it? Why doesn't LDAP have any way to store "Instant messaging" contact information ? (and yes, i google'd all around about this supposed "IMHandle" in my apple.schema, but I can't make it work)

i'm even talking about homogenous platforms here... I haven't gotten into cross-platform issues (yet).

i want a world in which my "digital life" is ubiquitous. across any platform, or machine, i need "my stuff" - and yes marc, i'm talkin' Digital Lifestyle Aggregation.

So Apple : I like your apps, and I really like your hardware. You could make me a fan for life if you'd just let people own multiple macs, but use *existing* technologies to let them all work together. You know, something like google talk allowing any jabber client to play.

needless to say, i'm right in tune with the ideas of a googleOS/webOS.

tags:
11 Jun 2005

wirelesstoronto

poking through my unread email, i noticed that the wireless toronto project finally launched a website. i was hoping to make a bit more noise about the fact that they were using drupal - but it looks like that is just for the "dev" site.

my involvement with wireless toronto (like so many great projects) has been virtually none- and really there's a long list of circumstances (including beers with a couple people in Montreal) behind my even being aware of the project.

however, there are some great local people involved in the project, and community wifi access happens to be something I personally have some interest in (despite not actually living *in* Toronto). so, if you're in the area check them out.

i've also had some *very* preliminary talks about working on something akin to WiFiDog based on drupal - more later if anything comes of that.

tags: , ,

tags:
1 Jun 2005

ah, slashdot

someone *please* explain to me why "Longhorn Drops 'My' Prefixes" is frontpage news...

i mean, it's one thing that slashdot doesn't do full-post RSS feeds or that they strip out all links (trying to eek every last advertising dollar). but, lately every post on slashdot worth reading is already in my aggregator-of-the-week (as a full post, usually). and now.... now i come home to this? what, am i to expect intriguing discussion in the comments?

sorry slashdot, it's been a fun ride...

tags: , ,

tags:
Syndicate content

James Walker

twitter Facebook Profile Flickr del.icio.us last.fm 43 People brightkite Jaiku Pownce Plurk Linked In Dopplr Digg upcoming

twitter

I've been up before 8 every day this week. I'm so ready for back to school. The kids? Less so.
1 hour 39 min ago

comments

Syndicate content
powered by drupal Get Firefox! ecto powered Creative Commons License James Walker