Well, this stumped me for like an hour.
The Google Civic Information API is a handy way to grab voting and elected official information. The current way I do that on GeoPortal is to enter some representative information locally and update it when somebody emails me in ALL CAPS. That is not a good way.
But the Google Civics API’s representative service (oddly) only does POST, and POST doesn’t do JSONP, necessitating a proxy. And to further complicate things, it isn’t a straight-forward cURL operation – you have to send the POST argument as JSON and not the default x-form or you’ll get an error message. So, do this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
And then a little jQuery to eat it.
1 2 3 4 5 6 7 8 9 10 11
I’ve been a happy Grunt user for a while now. I use it for dev watch/preprocessing/livereload type stuff, and it works great. It is, however, a bit cantankerous to set up. Sometimes you can’t seem to get around making intermediary files when stringing tasks together either, which means crud in your folders. I hate folder crud.
Gulp is the new hot stuff for task running. I hadn’t heard of it until a few weeks ago, but after having a play with it it might replace Grunt in my stack. The configuration is easier to set up and read, and because it uses node streams it can net you a decent performance boost.Read on →
I’m in the process of replacing our primary web server for open source stuff1, and it seemed like a good opportunity to figure out how to get our content to the “cloud” or, if that word raises your nomenclature hackles, a VPS host.Read on →
Nothing sets my propeller-hat spinning faster than nerdgear. When people talk about how they work I decouple with my headphones and listen. Because, somewhere deep down, I’m pretty sure I’m doing it wrong.
Without further lolcats, here’s my toolbox at the start of 2014. Note I’m detailing my home kit, as I work there most of the time and talking about my County working conditions would needlessly depress you.
- Lenovo z510 dual-core i5 Haswell laptop, 8GB RAM, SSD for OS
- Dual 22” 1080P monitors
- CM Storm QuickFire mechanical keyboard
- Logitech M570 marble mouse
- Blue Microphones NESSIE microphone
- Logitech C920 HD webcam
- M-Audio AV30 powered monitors
- AKG M80 MkII earcans (big meh – won’t last the year)
- Samsung Chromebook
- Nexus 7 2013 model
- Samsung Galaxy Nexus (which will be crushed under heel when my Verizon contract is up)
We live in an age of insane personal computing power. So insane I downgraded my home rig. I went from a home-built quad-core i5 with discreet graphics and 16GB of RAM to a Lenovo z510 i5 laptop with a dual-core i5, integrated graphics and 8GB of RAM. It isn’t an even swap – Lenny has Haswell i5 with hyperthreading – but it’s a downgrade.
Other than the fact that it sips power, is nearly silent and doesn’t double as a space heater, I never notice the difference. OK, I rarely notice the difference (hi HandBrake!). But overall I’m very happy with this laptop. It stays chained to my desk, lid closed, powering my external monitors. It has a nice 1080p screen, so if I ever unshackled it from my desk I could do serious work at Starbucks. And here’s a free PSA: if you’re on Linux and you’re not a gamer, always get Intel graphics.
I’m rocking my usual dual-monitor setup with a mechanical keyboard. One new toy is my Blue Microphones Nessie, which includes some auto-processing onboard (compression etc.). Beyond that not much has changed.
I use my Chromebook about as much as I use anything else. I love that plastic piece of shit. I almost bought a new Acer model with a Haswell processor, but then I caught a rumor of a $250 Samsung coming out with retina-esque resolution later this year.
For tablets I like my Nexus 7. My iPad rarely gets touched. It’s a tad big and heavy for reading, and the screen on my Nexus 7 is crazy good. That’s mostly a reading/entertainment device – people that say they do real work on tablets are probably crazy.
- Kubuntu 13.10 64bit
I’m still rocking along with KDE and Kubuntu. I keep threatening to go to Arch. I installed it on a VM and a netbook just to prove to myself that I could. I like new stuff – I don’t want to have to wait 6 months for a new Kernel or software package and dealing with PPA’s can get old. The idea of a rolling release is very appealing. Maybe I’ll jump when I hit the 4-months-of-13.10 blues.
- Sublime Text 3 (beta)
- Sublime extensions: Package Control, AdvancedNewFilename, AutoFileName, ColorPicker, DocBlockr, EditorConfig, Emmet, HTML-CSS-JS Prettify, LESS, Markdown Preview, Markdown Editing, Nettuts+ Fetch, Sidebar Enhancements, Sublime Linter
- Kate, Notepad++ (Windows) and nano for quick edits
- Grunt extensions: grunt-contrib-watch, grunt-contrib-uglify, grunt-contrib-concat, grunt-contrib-less, grunt-autoprefixer, grunt-text-replace, grunt-contrib-imagemin
- Inkscape and GIMP for graphics
- Google Chrome
- Chrome extensions: LiveReload, PageSpeed Insights, REST Console, Screen Capture, Secure Shell, Web Developer
I don’t think there’s a lot here that needs further explanation – if you’re a dev you know most/all of this stuff, if you’re not a dev you don’t care. Sublime Text is still the best editor I’ve run across, and I’m too old to learn Vim + a tiled window manager, though damn if that doesn’t look awesome.
I would like to point a finger and jump up and down about Autoprefixer if you haven’t heard of it. How would you like to never worry about browser prefixes again? Autoprefixer gives you that in a way you can control very precisely. By setting
browsers: ['last 2 version', "> 5%", 'ie 8'] I’m prefixing for the last 2 versions of every browser, any browser with above 5% market share, and >= IE 8 specifically.
Everyday stuff I can’t live without
In no particular order:
- PGAdmin III (because psql is bullshit)
- Dolphin, the greatest file manager ever
- D3, even though it hurts my brain sometimes
- Lots of Google services (Gmail, Docs, Keep, to name a few)
- Feedly, so I can keep up with you people
- Twitter, so I can mimic a social person
Stuff I want to like in 2014
- A client-side MVC framework. I’ve played with Backbone, Backbone + helpers (because Backbone by itself is a bitch), Angular, Ember, and did the ubiquitous ToDo list app with some others. I’ve tried to like it. I just don’t. I end up with 3x the code and I’ll never be able to share it with co-workers because there’s too much magic overhead. Lots of people like this stuff, so it could just be me. Maybe in 2014 I’ll get it.
- I want to do something with QT. I don’t do desktop apps or C++, so the odds of this happening are not great.
- A serious Nodejs app, complete with a magical framework like Meteor. I’ve been waiting patiently for Python to eat my PHP addiction, but Nodejs gave it a beating for server-side web stuff. Actually ~10,000 beatings, all running concurrently. Maybe this year I’ll finally get off of PHP. I love PHP, but every time I tell somebody I did something in PHP I feel a little dirty afterwards.
GIS Day 2013 has arrived!
We’ll be flaunting our geowares on Wednesday, November 20th from 8:30-3:30 at Spirit Square, 345 N. College St., Charlotte NC. There will be fun for all ages and talks and demos going on most of the day. It’s open to the public, so if you’re in the area feel free to swing by any time. I’ll be there doing a few demos and hanging out most of the day. Look for the toe shoes and come say hi.
Bear in mind, I make no suggestion one should do these things. This is probably a terrible idea. What can I tell you – trying this out was more fun than the other stuff on my todo list.
Sometimes the border around an interactive map on a web page feels a little harsh. If you’re making an infographic or something similar, you might want the map to appear to be “in” the page rather than “on” it, and that’s hard to do with a chopped-off tile ending in a x-pixel border. Maybe you want to fade the map into the background, or maybe do some sort of torn-page effect. Here’s how you could do that.Read on →