fusi0n
31Jan/12

Canadian Postal Codes Database

I needed some data on Canadian Postal Codes for a project I'm working on. In context, I will have an user's postal code, but no way to validate it or use it as an index to get more location data. I started looking for free lists of Canadian postal codes I could merge in my application to achieve what I wanted. The first place I looked was obviously Canada Post, but it seems they're still in the mindset that selling public data is okay and only offer to license validation data... for 5,500$ a year. Mind you, it does seem include every Canadian addresses, not only postal code/city association.

Next in line was PopularData.com who offers a free database of 765,345 postal codes and their geographic data (city, province, latitude, longitude). Such data seems to be something recurring in various projects, so I figured I'd post here once and for all to tell you (and make sure I remember) how to get that data and inject it into a MySQL database on a remote server. Here goes.

15Jan/12

#Newnewtwitter Keyboard Shortcuts

Twitter's new design, the second one since the mass adoption of the platform, lovingly called #newnewtwitter was just enabled on my account. You can get a nicer output than what's below by pressing '?' in #newnewtwitter. They're pretty useful keyboard shortcuts - if you, like me, find yourself using the Web version more often than anything else.

Actions Navigation Timelines
F Favorite ? This menu G H Home
R Reply J Next Tweet G C Connect
T Retweet K Previous Tweet G A Activity
M Direct message Space Page down G R Mentions
N New Tweet / Search G D Discover
Enter Open Tweet details . Load new Tweets G P Profile
L Close all open Tweets G F Favorites G M Messages
G U Go to user...
14Dec/11

Fanboy Advices

I realize the impending irony of writing this post right after my small hommage to Steve Jobs.. but somebody on the Internet is wrong. You know how that goes. Jim Darlymple recently blogged about his definition of an 'Apple fanboy':

Someone who is tired of technology being difficult and knows there is something better; someone that loves to get the job done instead of working on their machine; a person that isn’t afraid of breaking the status quo; someone that appreciates quality design and workmanship; a person that realizes cheapest isn’t always best. Apple fanboys are commonly confused with the sensible people of society.

I don't care much about his argument for quality design and workmanship, his affirmation that cheapest isn't always best or his stab at societal common sense. What transpires from the rest of his 'definition' is what I don't want to see happen with the world. Telling people to get an Apple product if they think technology is too difficult is how we'll end up enslaved to the fruit-people. It's supremely important in this day and age not to let technology become overwhelming. Technology, in the state it's in, is meant to be understood and played with, not merely consumed. If you have no understanding of what you're using, well first you're going to be in a world of hurt, then you'll have to rely on somebody who actually understands to help your sorry ass out. Technology isn't kind to neophytes. For every Apple fanboy there is, there's a geek who knows better.

6Oct/11

Here’s to the crazy ones

An Era ended yesterday as the mighty Steve Jobs, who recently stepped down as CEO of Apple, passed away at 56 years old after a long battle with cancer. It's sad. It's really fucking sad. For Mac, iPod, iPhone and iPad lovers it's sad. For compulsive audiophiles, digital historians and designers, it's sad. For the millions of people he and his disciples championed and inspired, the tech reporters and the business analysts, it's sad... But most of all, we've lost a a pioneer, a leader and an icon.

5Oct/11

Randomize GNOME3 Wallpaper

I've been looking for a simple script to randomize the display of my wallpaper on my GNOME3 desktop.  After trying a few apps and not finding anything satisfying, I made my own. It's based on Dhananjay Sathe's wp-show but stripped of the GTK options dialog and some senseless redundancy.

Here it is:

#!/bin/bash
# To change wallpaper automatically after N minutes, add this to your CRON (where N is minutes): N 0 * * * /path/to/wp-show
base="/home/pluc/.walls/"
photo=$(find $base -regex ".*\([jJ][pP][gG]\|[jJ][pP][eE][gG]\|[gG][iI][fF]\|[pP][nN][gG]\|[bB][mM][pP]\)$"  -type f | while read x; do echo "`expr $RANDOM % 1000`:$x"; done | sort -n | sed 's/[0-9]*://' | head -1)
uri="file://"$photo
gsettings set org.gnome.desktop.background picture-uri "$uri"
Tagged as: Comments Off
29Jul/11

Big Commerce API PHP Wrapper

Big Commerce is a hosted e-commerce platform. You are given FTP credentials to access the few static files you are allowed to manipulate... and you have an API. For various reasons, I had to interact with the Big Commerce API and since there was a serious lack of code (and decent documentation), I figured I'd put together my own little wrapper. Should be pretty self-explanatory if you're here. Needless to say, this code comes as-is with no support from me whatsoever.

15Jul/11

Grey Hat Programming on Big Commerce

One of my clients has a website constituting of two platforms: WordPress and Big Commerce. I was mandated to, among other things, create a symbiosis between the two platforms so that users didn't have to register twice. The only problem with that is being a commercial platform, Big Commerce doesn't want you messing around in their proprietary database - their API really is only for read stuff, you never write anywhere. Understandable... but my client still wants user synchronicity, and to be honest I don't think he's exaggerating.

So... how do we remotely create users on a platform that doesn't let you create users with their API? After a bit of looking around for solution, I stumbled upon my client's store registration form (which is hosted, like everything related to Big Commerce, on a server you don't control). Different domains, different servers, no API methods... but I have a form. Have you ever heard of XSS? In the world of developers, it's a real annoyance. Essentially, if you fail to secure your forms properly, anyone can grab your form, put it somewhere else on the internet and submit bogus data (because the form still sends to you, get it?). Anyway, it's usually really only a security concern, but for this particular project, it became a feature.

Page 1 of 11
1
2
3
4
5
10
...
Last »