RSSAmplifier

Blog

David Hamp-Gonsalves

Recent content on David Hamp-Gonsalves

davidhampgonsalves.comRSS feed ↗89 posts

Latest posts

SVG based Vector Scope

I was gifted a Sencore SC62 oscilloscope from the mid-80s. It had spent a good chunk of its 40+ year life in a barn. This beautiful device along with many similar models are being discarded since modern scopes have become so cheap and capable. To avoid that fate I wanted to repurpose it into something that would allow it to live indoors once again. Most oscilloscopes have an XY mode which lets you…

Neon Animated Eye

I think we have been missing out on the best thing about faux neon LED lights. I LOVE neon. I love the hum of the transformer, the flicker of a dying tube, their tenacity surviving the outdoor elements while still being so fragile. Faux LED neon doesn’t have any of that joy BUT if we infuse it with animation we can push further towards the 1930s-era dreams of moving neon signs.

13 Years of Foxish

13 years ago I owned a hand me down Sony Vaio laptop. It was hot and slow with a worn out battery and browsing the net was the bane of its existence. Around this time chrome was launched for Linux and it was so fast and light that it made this laptop usable again. The only issue was that it didn’t have RSS support and I loved Firefox live bookmarks for keeping up with hackernews and digg.

Solar Powered Conways Game of Life

I made an e-ink based, solar powered version of the famous Conways Game of Life . Typically these celular automations run at whatever speed our eyes find to be visually pleasing but I wanted to see what a version that reflected the real worlds energy patterns would be like. In my version the world and its cellular inhabitants must survive low power peroids each night along with reduced power…

Junk Drawer Phone as a Music Streaming Server

I wanted to get a music streaming server running as I have in the past but with the scarcity of RasberryPi’s my I needed to try something new. I had a Samsung Galaxy S7 that had been taking up space in my junk drawer and this post is my journey to give it a new task. First step was remembering why I stopped using it. Trying to charge it revealed that the charging port was broken. I…

Recharable Flame Jar

I’ve learned a lot from watching BigClive and this project was the combination of three of those learnings. Free lithium cells and USB charge circuits litter the streets in most cities in the form of disposiable e-cigarettes. You can buy really nice “flame” bulbs from aliexpress for ~6$. You can still buy wonderful mecury position switches from China. I combined these components…

MidTBot Pen Plotter

I build the wonderful MidTBot and have been enjoying creating pen plots. My version abuses the tiny bot by extending the linear rods to give me a drawing size of 360x240 mm. Its brain is an ESP-32 running the flexible FluidNC which turns the GRBL into motor movements via two StepStick stepper drivers. Plots Mostly I’ve been doing procedurally generated pieces but I also played with 3D…

Solar Lights for Sub-Zero Temperatures

In cold climates solar lights are nice but typically short lived. Moisture corrodes their circits and once covered in snow the low charge levels will destroy the batteries. This is unfortunate because winter months can be the most enjoyable and with longer nights a little extra light, diffused through a sprinkling of snow is very pleasant. The easy way to circumvent these issues is to rip the guts…

ESP Based Scheduling Thermostat

I moved into a house that uses a few mini split heatpumps for temperature control and while the technology is efficient and amazing interacting with them is not. Each unit eschews the standard thermostat wiring and standards in favor of implementing their own baked in system. In my case this means that I can’t schedule temperature changes through the day or even set temperatures outside of a…

Life Dashboard

Second hand Kindles are waiting in drawers for someone to repurpose them into something great. Boasting large e-ink screens, wifi connectivity and ARM processors they are an amazing hacking platform. Check out the project repository for more details. In my case I created an information panel summarizing my day such as my calendar, surf and weather forecast, garbage schedule, school closures, etc.…

Halloween Mask 2018

I made a cardboard halloween mask powered by an Arduino. Unfortunately it was too scary for the kids when combined with the hunch back and cloak I made so I couldn’t wear it. It has blinking eyes and a breath animation and the code that powers it can be found in github .

Reverse Engineering Cat Genie 120 DRM

TLDR : My robot cat litter box bricks itself after a set number of washes with each soap cartridge so I reverse engineered and suppressed the verfication process to enable refilling. Problem I bought a robot cat litter box called the CatGenie 120 and it was great… until I realized that the helpful low soap warning was actually DRM which blocks all cleaning actions once its official soap…

Arduino Grow Clock

A grow clock is a simple visual indicator of day and nigh. Its purpose is to help children understand day and night and to convince them to stay in bed sleeping until the world is ready to get up. My version was made to be recyclable, since these devices are only useful for the short time before children can read a traditional clock. I its comprised of a servo and an Arduino MKR1000 (because I had…

Harvest Automation

Keeping up with invoicing is time consuming is an easy task to delay / forget due to procrastination. I automated the task of generating the initial structure (two week period, 8 hours a day, only weekdays) so that I get a reminder email at the end of every period and I can just make adjustments and send. You can find the code here .

GCN Top 10 Cycling Apps

A few years back I wrote a simple launcher that took advantage of Strava’s NFC action intents to automatically start recording a ride. I created some icons for it, named it One Tap Record for Strava and put it in the Play store for others to use. Fast forward to today, where without a single update or PR campaign the “app” has garnered 100 thousand users and was featured on…

DIY Cycling Rollers

I built a set of rollers to determine how much I enjoyed riding them. They were made from 3 inch ABS pipe, which I finished with drilled end caps, fitted with lag bolts. The bolts fit into ball bearings(scavenged from a skateboard) which were recessed into the 2x4 frame. This build was intended as a proof-of-concept but worked sufficiently well that a second version was not required. The only…

Gif Twist

I saw a interesting timelapse animation on Reddit and created Gif-Twist to automate the long manual processs (~10 hours). Gif-Twist combines all the images of a timelapse into each output frame, displaying slices of each radiating around a central point. Examples

Cargo Bike in Canada

I’ve had a Babboe cargo bike in Toronto for a year now, this is a review of that time. I’ve ridden the Babboe every day for a year. Its terrific on the ice and works well in deep snow. Its amazingly useful, and gets my daughter to daycare and back each day. It holds about $200 in groceries plus a child. Its easy to peddle and only takes a few minutes to learn to ride (if you can…

A New Value Add for Being the Best

TLDR: Training data shapes our current iterations of AI and as they get more competitive so will the people who create it. While its easy to use training data from many individuals(driving habits for example) which might average out to be the best overall it will be hard to optomize for specific attributes(gas millage, passenger comfort). I think this will create new incentives for being the best…

Hugo Black & Light

I converted my blog from Octopress to Hugo and in as part of that process ported over the existing theme. Its available on the Hugo Themes Site . Its called Black and Light and is high contrast, text oriented, and Javascript-free. Features Loads in a single request (with web-fonts disabled) 100 / 100 on Google Page Speed test (100 / 100 on mobile with web-fonts disabled) Scriptless (unless you…

Octopress to Hugo

I ported this blog (and its theme from Octopress 2 to Hugo. The process (which I wont go into detail about since the hugo docs are great) was enjoyable and quick. Hugo is easy to reason about, amazingly fast, and at least for a simple site like this a much better fit.

Webhook Liason

Webhook are the glue between many internet services but in many cases developers will write little bits of code to help translate payloads between such services and make them compatible. Webhook Liason was designed to address these requirement via configurable filtering/transforming proxy for Webhooks / HTTP requests. This allows the conversion of request data to JSON, limits subsequent requests…

CircleCI vs Travis

TLDR : Just use CircleCI. Having used both products in my last two positions I can say that while I once pined for Travis’s(then) superior documentation, that stage has passed and I now enthusiastically choose CircleCI. CircleCI’s UI is amazing. It feels snappy and well suited to the task. I often find myself waiting for pages to load in Travis. The UI is also branch centric which…

Should You Move To San Francisco?

TLDR : Yes. My move to SF is 100% a silicon valley stereotype. I wrote an app(eb), was contacted by some startups and large valley companies and a couple weeks later I was on a plane with a 6 month old and my wife. Coming from Toronto there was almost no cultural transition, except for the dissonance between rich/poor and how strictly each cultural group / archetype stays in their own portion of…

Hacktoberfest 2015

I took part in Digital Oceans Hacktoberfest & had a lot of fun. I ended up pushing some PR’s to new projects that I wouldn’t have otherwise and got a a t-shirt even though I live in Canada (usually these things are US only). I also noticed an influx in GitHub stickers in my neighbourhood (which were included with the t-shirt) so I assume there must be a few participants in my hood.

Java 8: The Good Parts

Sometimes I feel that Java has become a second class citizen on the JVM. While it commands a huge market share and is generally blazingly fast it hasn’t progressed like Clojure, Scala and even Groovy have. Java 8 delivered on some of the long planned features and this post is to talk about my favourites. Streams Java’s Streams are monads that let you represent computations as a chain…

The Value of Failed Projects

Personal projects fail just as easily as well funded professional ones. Even small projects and spikes deserve to be put down gently and documented for the benefit of all projects that follow. My contributions are: Tree-Rings Open-Mosiac

Failed Projects: Open Mosaic

The goal of this project was to recreate an image as a mosaic of other images. I wanted to achieve this with a low number of tiles and not simply use images as pixels based on their colors. Mistakes The biggest mistake I made was to vastly underestimate the difficulty of the problem. I thought I could get good results by tuning my early histogram grid implementation and floundered. I have seen…

Failed Projects: Tree Ring Generation

Project Goal I wanted to generate SVG based tree rings that would mirror peoples lives based on some basic info (name, age, times of growth). Project Motivation Tree rings are interesting because they contain a lot of information. Over the course of the project I identified and achieved the following: age (how many rings) species (bark characteristics, color, chance of cracking, etc) ring dark to…

The Longterm Costs of Personal Projects

Maintaining personal projects incur a small but on going cost: API’s change, PAAS’s deprecate old stacks, frameworks and libraries die / decay and domains need to be renewed. If you want your projects to live to a ripe old age without requiring a constant stream of your love and attention I suggest: Avoid PAAS Heroku, GAE, etc are all active projects that regularly deprecate obsolete…

File to Knife Conversion

To learn some of the basics of metallurgy and have an understanding of what goes into some of our most basic tools I built a knife out of a discarded file. Good quality files are made from high carbon steel which can be annealed (softened) so that it can be worked into a new shape and then hardened to produce a pretty high quality knife. I mostly followed the excellent video series by Walter…

WebRTC in 5 Minutes

While WebRTC has been around for awhile now but its still feels like a young technology and there are few resources to learn about it. These are the basics of how a connection is made between peers which is important for understanding how WebRTC differs from traditional networking. Creating a Connection __Fetch ICE (Interactive Connectivity Establishment) Candidates from STUN server.__ Contains…

Terminal GIFs on OSX

Using Gifs for terminal explanations and usages aren’t new and exciting anymore but they are still useful. This is how to create them quickly on OSX. Install The tool we will use to capture our gif ttygif . brew install imagemagick ttyrec brew install https \: //raw.githubusercontent.com/icholy/ttygif/master/ttygif.rb Gif The process of creating the gif is: Run ttyrec which records your…

Ethical Apps on Greenpeace Podcast

Did a interview about ethical apps on the Greenpeace Podcast . Its a great new podcast and I had a great time speaking with them. Listen The podcast is also up on soundcloud so you can hear my first segment or the entire show from there.

Docker Phusion Base

I have been using the phusion baseimage-docker . While in the past i’ve been mostly interested in making my docker images as small as possible with images like alpine-linux(busy-box based) the Phusion base breaks from this tradition by encouraging you to run multiple processes from a single container. While I was wary of this approach initially they make a good argument for it and in…

Launchd in 5 Minutes

Launchd is the official way to schedule a task or run a service on OSX. The provided documentations goal is to turn you into a launchd expert at the cost of your afternoon. These are the 5 minute highlights to get a task running. Configure Plist You tell launchd to run a task by putting a reverse domain named plist file( com.example.name ) in ~/Library/LaunchAgents , this is probably what you are…

OpenCV CompareHist Performance

I did some performance tests on the four histograms comparison methods that [compareHist](http://docs.opencv.org/java/org/opencv/imgproc/Imgproc.html#compareHist(org.opencv.core.Mat, org.opencv.core.Mat, int)) provides and initially found that in basic performance tests they were all about the same speed. More recently I profiled them in a real world application and found they were significantly…

Markov Chains in Clojure

I noticed that when you enter 30 into tumblrs age field it switches from “years old” to “years young”. Fully grasping the limited scope of my existence for the first time I wrote a Markov Chain generator so that it could provide(tenuous) value long after I have fled this mortal coil, by mashing up the works of Roald Dahl with some Clojure manuals . When you reach this point…

If You Are Moving To San Francisco

My family and I moved from Canada to San Francisco recently these are some pointers for others thinking of doing the same. SSN You wont have an SSN for a while. You need to wait 10 days before you can apply in person and then wait some more for it to come. The next points all deal with living without one. Banking You’ll probably hear many recommendations about getting a TD or RBC cross…

The Music Player/Organizer For the Rest of Us

Everyone has their own (strong) opinions about this but I think I’ve figured it out. First to organize your music Beets is amazing. Its light, easy to use and lets you tweek things exactly how you want them. The limitation with Beets was that it was just an organizer and you still needed a full GUI application to conveniently find and play your music. This weekend I wrote the Play plugin…

Painless Resumes with Markdown

Latex might be the most fashionable format for the discerning developer but I think its overkill. For my current resume rerwrite I choose markdown because: Its plan text so its easy to edit and version . Its super simple and you are probably already well versed. There are already a bunch of nice css templates to work from. You can use it to generate most formats you may need. This is my resume .…

Postgresql Range Basics

In postgres 9.2 a new family of data types were added called Ranges . This is a quick overview of how to use them. Range Types There are a handful of built in range types that cover the expected number and date types and you can also define your own if you need something outside of that. Basic Operations Defining Range - CREATE TABLE ranges (range int4range) Inserting Range - INSERT INTO ranges…

Dynamic CSS Reset

When ever you ever have to inject HTML into an unknown page you have to battle with all the page styles messing with your own content. This happens a lot when building bookmarklets like my recent RSVP Reader . In the past you had to manually assign values for all the CSS properties that could have been set by the page. Since then then initial CSS property was added we can perform this reset…

Spritz like(RSVP) Reader Bookmarklet

So after seeing Spritz I waited for someone to whip up a nice extension so that I could try out the same technique( RSVP ) in my brower. Since that hasn’t happened I created a bookmarklet that covers the basics so that we test this all out in real life and see how useful it really is. install To install drag the following link to your bookmark bar. 20 ? model.index-20 \: 0; if(model.pause)…

Technical Interview Prep

This is my current list of online resources for preparing for technical interviews. I’ve setup this list as a github repo to allow others to contribute via pull requests. Short List big-O cheat sheet - Refresher on the complexity of various algorithms. Design Patterns - Quick reference of design patterns. Sorting Algorithm Animation - Sorting algorithms visualised. Hacking a Google Interview…

Awesome Free Hosting Stacks

Weekend projects and free hosting stacks go hand in hand. Its a hard sell to sign up for recurrent fees to power hacks and “experiments”. This is a list of combinations that I like. Highly Cachable Database Driven Sites Heroku + Mongo HQ : Databases on Heroku can be expensive. You can get around this using plugins and being flexable with your backend choices. The two best options I…

Generating Identicons

Identicons are icons that are generated from some form of user information. They usually serve to fill the gaps left by photo-less users that don’t provide a photo as unique(ish) identifiers for users. These are usually generated by hashing the chosen user data and then using that hash to flip image pixels on and off. The following code snippit is a Java implementation of this concept and…

Apps4Halifax Crime Heatmaps

I took part in the Apps4Halifax open data contest and won second place in my category with Halifax Crime . Halifax Crime is an animated heatmap of crime in the city.

Building a Basic Android Bot

Last week I started playing a new game on my phone called Castle Crash. I don’t play often play video games but when I do, I play them obsesively until they are defeated. In this case you can’t beat the game since you are playing against the internet so I decided to tap out and let my computer take over. MonkeyRunner Android has a great tool for writing simple automated tests on a…

Compressing JSON into a Brittle Lightweight String

Client side single page apps tend to throw a lot of JSON data across the internet. These are some techniques I used on cimrheatmap.ca to compress my Geo/Time data by about 90% and avoided the overhead of gzipping the page. Be warned most of this was just for fun and is a silly idea because of the disadvantages listed bellow. {lat\:45.123, lng\:-63.123, type\: 'Assult', timestamp\: '1383837388112'}…