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.| David Hamp-Gonsalves
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 along with a glass jar and a 3D printed frame into a digital flame jar.| David Hamp-Gonsalves
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 vectorization using Blender/Freestyle, pixel art fills, vector fills, clear layer topographic mapping (of t...| David Hamp-Gonsalves
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 out of an existing unit, replace its battery with a cheap (3-4$ aliexpress) greencap 100F superc...| David Hamp-Gonsalves
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 small range (16°-25° C).| David Hamp-Gonsalves
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. My favorite part is that any extra space is filled with a random Pokémon sprite which my kids(no...| David Hamp-Gonsalves
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.| David Hamp-Gonsalves
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 cartridge is “empty”.| David Hamp-Gonsalves
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 a spare one) but any Arduino compatible board with a RTC(real time clock) will work.| David Hamp-Gonsalves
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.| David Hamp-Gonsalves
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 GCN’s Top 10 Cycling Apps list.| David Hamp-Gonsalves
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 deficiency I encountered was from poorly triangulating the cap centers(I used a tape measure and hand...| David Hamp-Gonsalves
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| David Hamp-Gonsalves
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 already ride a bicycle).| David Hamp-Gonsalves
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 at mundane activities.| David Hamp-Gonsalves
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 enable Google Analyitcs) Styles inlined in head High Contrast Style Demo h1 Heading h2 Heading h3 Hea...| David Hamp-Gonsalves
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.| David Hamp-Gonsalves
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 via filters and finally transforms the request JSON into the destination(s) format to be sent.| David Hamp-Gonsalves
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 better supports feature development where as Travis seems project focused and doesn’t suit my typical usage.| David Hamp-Gonsalves
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 the city.| David Hamp-Gonsalves
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.| David Hamp-Gonsalves
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 of steps. Typically they are created from a Collection and then the typical functional map, reduce, filter...| David Hamp-Gonsalves
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| David Hamp-Gonsalves
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 many other attempts at this project but yet to see any that produce good results.| David Hamp-Gonsalves
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 light ratio and smoothness cracks that span multiple rings and have depth defects in rings (both ...| David Hamp-Gonsalves
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 stacks which your project will eventually be running on.| David Hamp-Gonsalves
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 Sorrells but with a modified design.| David Hamp-Gonsalves
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 details of how the data is going to be exchanged (ip, port, protocol).| David Hamp-Gonsalves
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 terminal session as series of png files. Run ttygif to convert the png files to small gifs.| David Hamp-Gonsalves
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.| David Hamp-Gonsalves
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 practice I have been really enjoying working in this fashion.| David Hamp-Gonsalves
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 looking for but if you want it to be global then put it in /Library/LaunchAgents.| David Hamp-Gonsalves
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 different. This is all using the Java OpenCV bindings.| David Hamp-Gonsalves
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 in your life you can save some time and use my Clojure implementation or write your own.| David Hamp-Gonsalves
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 border accounts.| David Hamp-Gonsalves
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 which lets you harness the might of Beets queries and send those results to your choice of lightweight m...| David Hamp-Gonsalves
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.| David Hamp-Gonsalves
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 VALUES(’[1, 4]') Infinate Ranges - INSERT INTO ranges VALUES(’[4, infinity]') Check Range Member...| David Hamp-Gonsalves
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 automatically.| David Hamp-Gonsalves
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. RSVP Instructions Select some text on a page and click the bookmarklet.| David Hamp-Gonsalves
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 Course Notes - General problems and prep suggestions(confidence booster). MIT Intro to Algorithms Le...| David Hamp-Gonsalves
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 found are Mongo HQ which will give you 1/2 a Gig of storage.| David Hamp-Gonsalves
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 generates a 5*5 pixel, horizontally symmetrical identicon much like the ones github recently rolled out.| David Hamp-Gonsalves
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.| David Hamp-Gonsalves
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 device called MonkeyRunner.| David Hamp-Gonsalves
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'} vs. '3 0 '| David Hamp-Gonsalves
I’ve been working on a crime heatmap animation lately and these are some tips for anyone else building something similar. Heatmap.js For my animation I used a version of heatmap.js that was tweeked for animation by alastair.is. The tweek slightly changes the look of the heatmaps but achieves a much better frame rate. The Animation If you new to Javascript based animation you will want to read up on window.requestNextAnimationFrame().| David Hamp-Gonsalves
This is a pretty lightweight way of detecting when your javascript is living in a mobile device. if(typeof window.orientation != 'undefined') { /* put mobile spesific code here */ } To omit spesific devices from running this code you can also add individual checks like the following. if(typeof window.orientation != 'undefined' && !navigator.userAgent.match(/iPad/i)) { /* put mobile spesific(but not ipad) code here */ } This is a mix of the answers found on stack overflow.| David Hamp-Gonsalves
Google Code Jam annual competition ACM ICPC annual competition ICF PC annual competition USA Computing Olympiad annual competition community training Facebook Puzzles competition SPOJ competition Hack-Fit competition hackathon Kaggle predictive modeling competitions community Hacker Rank competition community training Code Chef competition community training Code Forces competition community training Project Euler tests Initial Round community training Online Judge training Know of another on...| David Hamp-Gonsalves
There are so many Haligonians that want a GPS based Go Time bus tracker. The secret is that the apps and data exist, but that no one ever seems to find them. The other day that changed for me and I found (via wikipedia) an old broken government webpage that when you looked at the pages source contained a link to: mobile departures. When combined with the recent bus information released as part of Halifax’s Open Data Project you have everything you need to build a great Bus App.| David Hamp-Gonsalves
You can “draw” all sorts of stuff on Google Maps using Layers but mor simply you can also directly create polygons and with a bit of extra work make them looks pretty cool. In this case I’m tracing a country using data from the Natural Earth Google Fusion Tables Dataset. Here is the final product showing where New York is. Drawing a Polygon The Natural Earth Dataset provides outline coordinates using the EPSG 4326 projection.| David Hamp-Gonsalves
After reading about using online ads to launch a javascript based DDoS attack I started wondering about how well such a system would do at mining bitcoins. These are my rough calculations. From my research I’ve found there are 3 ways to mine bitcoins(compute hashes) using Javascript: UI thread (I was seeing about 800 hashes/s) Multiple threads via WebWorkers (I was seeing about 13000 hashes/s) Using the GPU via WebGL (limited browser support couldn’t find working example).| David Hamp-Gonsalves
If you don’t own a mac it can be tricky to write/build a mobile application for IOS unless you own a Macbook. In the world of Phonegap there are a few options to get you into the marketplace. Phonegap Build Phonegap build is very nice. It looks good, is easy to use, builds are fast, their debugging system is really nice and quite clever. They also offer hydration which causes your device to pull your latest build so you don’t have to reinstall.| David Hamp-Gonsalves
Everyone loves faster Javascript, which is why Mozilla’s ASM.js is such big news. This is my 5 second overview. ASM.js is a subset of javascript that allows for further optimization. You can mark your JS code as being ASM.js complaint by adding “use asm;” to your file/function(similar to “use strict”). ASM.js contains type hints and lacks a garbage collector. These differences make it highly optimizable (roughly half as fast as native).| David Hamp-Gonsalves
With Google Reader closing its doors the “Is RSS Dead?” debate has been revived. As someone who loves RSS(enough to write a Chrome Extension) but never liked Google Reader I’d like my turn on the soapbox. Since my first usage of Firefox(ver 1.5) I have always loved its live bookmarks feature(but not the read/unread indicators). RSS readers shouldn’t be email clones. They should expect us to ignore items and act as a consistent, omnipresent and minimal interface to the internet.| David Hamp-Gonsalves
Over the holidays I wanted to play some old game cube games to be festive(Christmas means new games). After some performance troubles I noticed that the version of the Dolphin Emulator I was using from the Fedora repos was version 3 and the current was 3.5. Eventually I broke down and built the latest version, which did make my life/performance better. Bellow is the command to install all the build dependancies and after that the build should go smoothy and you’ll be up and running in no time.| David Hamp-Gonsalves
When writing a mobile app there are a ton of choices you need to make before you really get started. I’m going to discuss some of my experiences making these choices and living with them afterwards, starting with PhoneGap/Cordova itself. Phonegap/Cordova First off Cordova and Phonegap are the same thing, Phonegap is currently transitioning over to be an Apache Incubator project which is called Cordova. When choosing to use Cordova you are saying a few things about your app.| David Hamp-Gonsalves
The Damerau Levenshtein algorithim calculates a distance between two words in the same way that basic Levenshtein does but adds transpositions to the set of operations that it uses to calculate distance. This makes it much more reliable at finding similiar or alternate spellings of words. I was doing some nodejs work lately and needed such a function to clean up one of my datasets and so I ported this version from C# to Javascript.| David Hamp-Gonsalves
Last week I got married(it was amazing and surreal). When planning the wedding we really wanted to make the whole night reflect “us”. This meant an all vegan menu from hearty catering(amazing) and a lot of elbow grease as we built and crafted mostly everything ourselves. Our signs were life sized pictures, the cupcake stand was wooden slabs of a tree and I build a photobooth which is what I’m going to talk about in this post.| David Hamp-Gonsalves
Lately I’ve been working a mobile app called Ethical Barcode that scans product barcodes and determines if the related brand is worth supporting/avoiding. As such of this I’ve been getting pretty familiar with the pitfalls and issues surrounding barcodes and product identification and I thought I’d share some of details that were tricky to find/figure out. Before we get into the hurdles though, I’ll cover some barcode basics. Barcode Types(that matter)| David Hamp-Gonsalves
Converting a barcode into useful, descriptive information is harder then you would expect. Or rather its difficult to do with any reliability and accuracy. There are a few good API’s that I’ve been using or looking into that I’ll cover here. The API’s Each service offers different information so you need to nail down your requirements before you read further. For my needs I really just need Barcode -> Company but I’ll try to add details that fall outside of that where I can remember...| David Hamp-Gonsalves
This is just a short and sweet set of commands to install Nodejs and NPM on Fedora 17. Versions Fedora Core 17 node.js 0.8.9 The Guts(go bash go!) sudo yum install openssl-devel.i686 gcc gcc-c++ sudo ./configure sudo make -j2 sudo make install su cd /tmp git clone https\://github.com/isaacs/npm.git cd npm make install exit Most of this was based on an older post I found here.| David Hamp-Gonsalves
This post should really just read: JQuery 1.4 breaks(Refused to execute inline script) when used in Chrome Extensions using the version 2 Manifest. Update to Jquery 1.7 and you’ll be happy. Unfortunately it doesn’t, it reads more like: Last night I decided to cross something off my to do list and updated Foxish(a chrome extension) to use the version 2 manifest that will become manditory in a short while. For the most part it was pretty painless.| David Hamp-Gonsalves
Last week I took part inHalifax’s Awesome Idea Market and had a fantastic time. This event brings people with ideas(sellers) together with people who want to chip in some money to get them started(buyers). As a seller I had the opportunity to pitch my idea to each of the buyers as they came around. This was great practice and it allows you to test and tweek each variation of your pitch in rapid succession.| David Hamp-Gonsalves
A couple weeks ago I entered my first AI related contest, hosted by scribd. The contest was great for beginners since it involved a very simple world and control scheme. At some point in by bot creation process I needed to determine the n-th highest number in an Array. While for such a simple project I probably should have just thrown some loops together and moved on, but since the project was just I started researching the problem and Hoare’s Selection Algorithm.| David Hamp-Gonsalves
Most of the key binding can be configured from the system settings > Keyboard area with the exception of the configuring the dash or overview overlay, which by default is bound to the left super key. This can be problematic in certain cases and especially in the case of some VM’s. To change this binding you need to modify the gconf settings by doing something like the following gconftool-2 -s /apps/mutter/general/overlay_key Super_R -t string This line when run from the termainal tells the ...| David Hamp-Gonsalves
Pygmenter is a web based frontend for the Pygments syntax highlighter. I whipped it up so I that I could write blog entries without leaving my browser and also to help when I’m unable to install pygments locally on the machine I’m writing from. code As always the code is tucked away in my git hub repo.| David Hamp-Gonsalves
Sticky headers are heading elements that stick to the top of the window as the user scrolls down the page. This is useful since you can use them to retain the contextual information of the section regardless of the position. In my case I needed to have multiple headers in the hourly forecast list for hourweather.com. I found there wasn’t much out there about this topic, especially when you want to have multiple sticky headers per page so I thought I’d share my implementation(which is pret...| David Hamp-Gonsalves
For simple javascript animations there is always a trade off between code size and visual effects. Recently I was trying to add some visual pizzazz to hour weather but didn’t want to incur the overhead of JQuery UI. What I was looking for was just a simple bounce effect on some moving objects. A lighter weight alternative that I considered was JQuery easing but even that seemed like overkill. My solution was to rip out the parts I needed and I wanted to share how easy that process is.| David Hamp-Gonsalves
Recently I needed a minimum viable animated web loading indicator. I didn’t want to add another image to my page for load time reasons. Nor did I want to write any javascript for size/time reasons. This left me with CSS animations. CSS based animations at this point only have limited browser support but for my project which already required HTML5 Geo Location it seemed like a good fit. This post is to show how easily this animation can be added as well as show how nicely it downgrades.| David Hamp-Gonsalves
For Hourly Weather I needed a full set of weather icons that represented a wide palate of weather conditions as well as had night/day versions of each. I couldn’t find an existing set that offered the scope I needed but I did find a set I liked. I can’t remember the source now(if anyone does please let me know) but working from that I build up the missing entries. Since the weather is everyones business I thought I’d share them here.| David Hamp-Gonsalves
A telnet client is a handy testing tool for testing connectivity between servers. Today I needed to test an SMTP server connection from a linux environment so I wrote the following script. You could use the same technique manually to do the same thing as long as your have access to a telnet client. Usage The script takes three parameters: the smtp server url, the sender address and the recipient address.| David Hamp-Gonsalves
I needed to do some SVN scraping recently to automate the detection of certain areas of code and this is what I learned. Libraries SVNKit was too low level for my(and I suggest most) needs. I found I was writing quite a bit of code for relatively simple actions. SvnClientAdapter provides a simplified interface for either the cmd line client, SVNJavahl or SVNKit. Its my recommendation that for most projects this is the best way to go.| David Hamp-Gonsalves
This is the first post in a series about injecting JSON based metadata into a live RTP streams using Wowza Media Server, Adobe Flex and OSMF. What We’re Building Over the course of these posts I’ll cover how to trigger a event with associated JSON data from a flash object via a NetConnection which then in turn cause Wowza to inject the related data into the live RTP media stream and then finally to listen for and handle that event on the client side OSMF based video player.| David Hamp-Gonsalves
This is the second post in a series about injecting JSON based metadata into a live RTP streams using Wowza Media Server, Adobe Flex and OSMF. What We’ve Built So far in the previous post we got Wowza setup and created a module which will inject our JSON metadata into our live RTP stream. What We’re Building (in this post) In this short post we’ll be triggering the injection of metadata from the browser using a flash object created with Flex.| David Hamp-Gonsalves
This is the third post in a series about injecting JSON based metadata into a live RTP streams using Wowza Media Server, Adobe Flex and OSMF. What We’ve Built So far in the previous posts(1,2) we setup Wowza and created a module which will inject our JSON metadata into our live RTP stream. Then we created a flash object to trigger the event injection with our metadata from the browser.| David Hamp-Gonsalves
Preamble I needed some color based object tracking for a project I was hacking together last weekend. I choose to use the OpenCV Python bindings since I knew that I wouldn’t be doing anything fancy and I thought it would simplify the learning process. While the Python bindings are great I wasn’t able to find much documentation and what I thought would be an easy 10 minutes turned into a bit of an afternoon project.| David Hamp-Gonsalves
There are some getting started tutorials for the iText library but I don’t think they really capture how fast and easy it is to get working PDF’s. Your standard servlet hello world example is 10 super simple lines. In your servlets doGet method: response.setContentType("application/pdf"); Document document = new Document(); try { PdfWriter.getInstance(document, response.getOutputStream()); document.open(); document.add(new Paragraph("Hello world")); document.close(); } catch (DocumentExce...| David Hamp-Gonsalves
Hourly Weather is two small projects that share the same major code base. The first is an App/Appwidget for the android platform and the second is a web application. Both projects have a similiar goal which is to give you an hour based forecast for your current location. The Android version does this using the devices build in location based hardware and the web application does this using the new HTML 5(kind of) geo-location api.| David Hamp-Gonsalves
While working on Foxish I needed to parse some RSS/Atom feeds in javascript. Thinking there would be nice a library for this I took a look around and found a couple old libraries and determined that the best of those was JFeed which is a JQuery plugin. Issues As I worked on the project I discovered issues with the library and since it was last updated in 2007 it didn’t support JQuery 1.| David Hamp-Gonsalves
The last few weeks I’ve seen more fake burning fires then every other holiday season I can remember so when I noticed no one had written one in canvas I figured I’ll fill the gap. the Fire Not being a game developer I needed to read a bit about how to create a reasonable but minimally resource intensive fire simulation. The one I chose works by randomly generating colors and then propagating them up the page while averaging out near by colors and adding a cooling effect.| David Hamp-Gonsalves
Note Feeder is a small web application that lets you save urls and notes from your current page. You can access your notes from RSS feeds to find sites or thoughts later. Features Save links and notes without leaving your page using the bookmarklet. Various ways to create notes. For details see the input methods page. Access your notes from your current page using the RSS feeds. For other options see the output methods page Description field supports markdown.| David Hamp-Gonsalves
Foxish is a Chrome/Chromium extension that mimics the excellent native handling of RSS and Atom feed reading in Firefox using live bookmarks. It does this by syncing RSS feeds with bookmark folders and refreshing them on a customizable interval. Features Enables live bookmark handling of RSS/Atom feeds. Detects feeds on the page(code based on RSS Subscription Extension by Google). Customizable polling interval. Import function for OPML. Download Get Foxish from the Google Chrome Extensions site.| David Hamp-Gonsalves
What is Foxish RSS? Foxish is an RSS/Atom reader in the style of Firefox’s Live Bookmarks. It syncs RSS/Atom feeds with bookmark folders so that you can conveniently watch and read the content. I feel this style of RSS/Atom consumption is a perfect fit for sites like Reddit, Hacker News, etc. My Foxish RSS feeds arn’t syncing There can be a couple reasons for this. First the feed itself may have an issue and second you may have hit the Chrome extension bookmark API limit.| David Hamp-Gonsalves
Solar Game of Life| davidhampgonsalves.com
I made an e-ink based, solar powered version of the famous Conways Game of Life.| davidhampgonsalves.com
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.| davidhampgonsalves.com