Skip to Main Content

Uncategorized

Free General Purpose Mail Merge

From time to time, I’ve needed to create a template file and populate it from a spreadsheet.  In Microsoft Word, this is pretty simple, using a feature called Mail Merge. However, sometimes I’m not working with a Word document. So, I created a script that provides that same functionality for any plaintext or zip encoded file.

If you go to http://gschoppe.com/projects/universal-merge/ and upload a template file and CSV, it will replace any tags found in the template, of the form [[heading]], with the data from a matching column from the CSV, based on the column heading.

The Facts of Life (politics in a coding blog??)

First things first, I am not a politician, and frankly, I am uninterested in changing anyone’s opinions on how to run this country.  In fact, I’d prefer to be staying out of this field entirely.  However, large numbers of otherwise intelligent people have been making statements recently that have no basis in logic, and I needed to weigh in on this intellectual dishonesty.  We need to talk about the two-party system.

Let me set the record straight for some of the voters out there, especially those considering who the “lesser of two evils” is. I am not going to talk about the qualities of various candidates, because that is shouting into a hurricane. Instead, I’m gonna give you some cold, hard, irrefutable facts about voting.

Do you live in Ohio, Colorado, Iowa, Nevada, New Hampshire, Virginia, or Florida? If not, your vote will not have any effect on the presidency. Your state is not contested, and you are not an elector. You are utterly and completely meaningless to the overall election. read more »

Add Auto-sensing File Type Icons to lists of downloads, with FontAwesome and CSS

Recently, I needed to create a downloads area that was going to be managed by a client.  It’s a reasonably straight forward task, except for one snag: They wanted icons next to the links, denoting what filetype the download was.  I could have created a few custom classes to add to the links, but the client is not at all technical, and I wanted to involve as little manual editing as possible.

Instead, I wrote a quick set of CSS selectors that filter the links by their href attributes, and provide the proper icon.  I still provided override classes, in case it doesn’t always detect properly, but so far, it seems to be working perfectly.

read more »

Picking Winners for Hashtag Contests

My office wanted to hold a drawing a few weeks ago, where people would share a photo with the company name as a hashtag, and one random poster would win a gift card.  These are great contests to boost a business’s social standing, but with so many hashtag friendly social networks, it’s hard to choose a winner in a fair way.

We found a great hashtag aggregator, called Hashtagr.co, that displays a pinterest-like feed of hashtagged posts across multiple social networks.  It made for a great leaderboard, and got all the data in one place, but it still didn’t solve the picking problem… So I wrote a quick script, and packaged it up as a bookmarklet.  A bookmarklet is a link that can be added to your bookmarks, that, when clicked, will run some custom javascript, rather than changing pages.

My bookmarklet for Hashtagr selects a random post in the list, scrolls the browser window to it, highlights it with a red border on the bottom, and opens an alert box that declares that poster as the winner.  To use the bookmarklet yourself, simply drag the bookmarklet below to your bookmarks, go to a hashtag feed on hashtagr.co, and click the bookmarked link.

Hashtaggr – Pick Winner

Rapid Prototyping for Strangers Pt 1 – Knitting Counter

I’ve always been a big proponent of learning how to rapidly create prototypes.  It doesn’t really matter what field you’re in, from architecture to programming, fast prototypes are gold.

Recently, I’ve been brushing up on my javascript, designing various web utilities.  One of the best ways I’ve found is to create bespoke code for strangers online.

Today, I received a comment on a post I made years ago on instructables.com, describing my build of a custom USB foot pedal.  The commenter was a 73 yr old knitter, who was interested in finding a way to count her rows with a foot pedal.  I decided to make it happen.

It took me about an hour and a half to create a web app that could integrate with a cheap usb foot pedal ($11 on amazon) and increment a counter. (the proof of concept actually only took 15 minutes, but I wanted to add goals, customization, and better overall user experience).

I loaded the code onto github, hosted the app on my site, sent the commenter a response, and posted the app to reddit’s knitting community.  Since then (5 hours ago), I’ve gotten 20 replies from knitters around the world, who have added my app to their workflow.

The lesson here is, “if you are prolific and can solve problems quickly, you will find an audience.”

Here’s the link: http://gschoppe.com/projects/knitting-row-counter