Blog | Tom Ward
When I was working out in California, I occasionally found myself wanting to get
access to my home network for things like network shares, connecting to my local
machines or various other reasons. As I had a Raspberry Pi knocking about, I
decided to set it up as a VPN server to allow me to securely connect back using
my iOS devices. So here’s a quick guide on how to do just that!
I recently updated my laptop to Apple’s newest OS, El Capitan, and unfortunately
due to their new rootless feature, the setup I had working for web development
had been reset. For this reason, I thought I’d really quickly show how easy it
is to setup an Apple laptop to develop Symfony websites. This guide should also
work for previous versions of OSX as well.
Recently in my spare time I’ve been dabbling with Apple’s not-so-new OpenGL
replacement, Metal, which has frankly been an absolute joy. It’s a very neat and
tidy API, a lot simpler to understand than the monstrosity that is OpenGL and
gives a lot more fine-grained control over command dispatch, sharing buffers and
threaded dispatch (yey!)
For all its bells and whistles, there was one thing that I found really
annoying. It’s quite a common thing to want to use a texture for applying
various effects in OpenGL, using the R, G, B and A values the image’s pixels to
store arbitrary data in. A good example is when doing bump mapping, where you
might want to store the bump amount in the diffuse texture’s alpha.
However, on iOS it doesn’t seem to be possible to do this. The problem is that
when you load a PNG image on iOS, by default it seems to automatically
pre-multiply the image by the alpha channel. This means that when you load the
UIImage, iOS automatically multiplies the R, G and B by the pixel’s alpha
amount, which means you lose the color values for anywhere there’s a zero alpha.
Recently I’ve been getting my teeth into NoSQL-based map-reduce problems, where
I want to throw a lot of data into a database and then produce some interesting
queries. For this I decided to start playing about with MongoDB, which seems to
be one of the most popular solutions out there. For this, I wanted to get
it running as a system service, in the same way as having Apache and MySQL setup
on my macbook. Here’s what I did to get this setup using launchd and a
_mongodb
system user.
Recently I’ve started delving into the world of writing iOS apps, mainly because
it’s just so much faster to develop than in C/C++. I decided to create a little
exercise app to give it some context called “FriendTracker”. The premise was
that it would keep a history of your location, but also allow you to see where
your friends have been as well.
To do this I would need to store the data on a web service so that others could
see where you’ve been whilst offline, so I began setting up my Raspberry Pi as a
little server to do just that. That was until I stumbled across a service called
“Parse” that looked like it would tick all the
boxes and then some!
Parse is basically a NoSQL-based service specifically for mobile development. It
provides SDK’s for pretty much every popular device & languge under the sun, as
well as a REST API for everyone else. They also provide analytics, crashreports,
push notifications and, on some devices, offline caching. It still seems a
little green around the edges (I had issues with empty objects being uploaded)
but overall it’s really pretty awesome! Caching and querying the data is a
breeze, integrating the SDK is relatively painless and, most importantly, it’s
free to setup and use!
Will post some more stuff on it later, but am enjoying the experience so far!