Adam Sullovey

Important Bits by Adam Sullovey

Find me on CodePen, GitHub, or at Toronto tech meetups.

February 17, 2020

Notes from DotJS 2019

That was fun. Don’t be tempted by beanbag chairs after lunch, you will pass out. Here are my notes and links to videos.

Read more

September 4, 2017

From WordPress to Hugo

So I can move from shared hosting to static file hosting with Netlify or Firebase and not have to maintain a WordPress site.

Read more

May 13, 2016

CSS & Spritesheet generators

I like tools that let me drag and drop a bunch of images into my browser, and generate CSS & a single image for me to integrate into my project.

Read more

February 28, 2016

Deploying apps from circleci 1.0 to Firebase hosting

September 2017 update: CircleCI 2.0’s config file format is different than what I describe here which is CircleCI’s 1.0 config format. The idea of getting a token from Firebase and using with CircleCI’s environment variables and config file still applies.

Read more

October 30, 2015

When Bower install doesn’t work

If you have a bower.json file, and running bower install from the same directory appears to download packages, but not actually put them in your project directory or even create a bower_components folder, check the version number of your package inside bower.json. Sometimes a version number of 0.0.0 prevents packages from installing, but setting the version number to 0.0.1 will make it work.

Read more

October 2, 2015

Reusing an ES6 iterator? Not quite

One you’ve called iterator.next() on an array iterator enough times to make it return the last item with the property done set to true, you can’t make it go back to the first item. But you can grab a new iterator for the same array. I was surprised to find out in the node.js REPL that:

Read more

July 28, 2015

Remotely viewing Raspberry Pi Cams

If you’ve mounted where your Raspberry Pi and camera in a place where you can’t plug in a screen and keyboard, you’ll want an easy way to see how its photos look. Try using a mobile app instead of manually transferring photos to another machine where you can view them.

Read more

May 5, 2015

307 HTTP status code?

Are you seeing 307 status codes in your network traffic inspector while debugging your site lately and feeling confused? Ask yourself:

Read more

January 23, 2015

Standing desk in a bookcase

Got a bookcase with adjustable shelves? Want to see what using a standing desk feels like? Here’s an inexpensive way to try it out. You’ll need a separate keyboard and pointing device (mouse, tablet, trackball, whatever).

Read more

December 12, 2014

Javascript bind vs call

bind and call take same arguments, but do different things. call simply allows you to execute a function in a specific scope and returns the result of running that function. bind actually returns a new function locked to the scope passed in, and you may execute it as many times as you want.

Read more

December 10, 2014

Interview Cake Problem #11

I was on the right track with breaking down the problem. I was ready to start looking for sequences of matching cards across the deck and 2 piles, but the hint suggested to break the problem down further to matching individual cards. With that hint, I was able to implement a good solution.

Read more

October 21, 2014

Evolving a Machine Learning & Analytics Platform in Python @ Full Stack Toronto Meetup

Our stack is a Python back-end with AngularJS for the front-end. We started with a pretty simple Django app using MySQL with scikit-learn for predictive modelling. Along the way we added Celery and Redis, statsmodels for forecasting, and we’re in the process of moving our data analysis into Cassandra with Spark. This talk will focus on technology choices and how we’ve grown the system from just a few stores to thousands in less than a year.

Read more

September 11, 2014

Acronyms

I see these over and over again in debates on Hacker News. Time to write’m down!

Read more

September 8, 2014

Buying fancy ergonomic chairs – new vs used

You’ve decided you want that SAYL, Embody, or Zody. Now how much do you want to spend? Lots of people blog about picking up Aerons for $200 during the dot-com bust, but supply and demand for high-end ergonomic chairs has changed dramatically since then.

Read more

July 29, 2014

Continuous Delivery @ Full Stack Toronto Meetup

Nick and Xiyang will discuss continuous delivery on a full-stack JavaScript stack and how today’s DevOps and Test-Driven-Development processes have enabled the seismic shift in best practices from frequent delivery to continuous delivery. Nick will present an updated maturity model for shifting to continuous delivery and Xiyang will share best practices learned on several rangle.io projects.

Read more

April 27, 2014

The Bowling Game Kata in nodejs

I had to ride a train with sketchy internet connection this week, which meant it was finally time to try Bob Martin’s Bowling Game Kata. This is a simple walkthrough of building a system for scoring bowling games using Test Driven Development. It is simple (one class, < 10 functions, often less than 200 lines of code), short (50 code examples, less than an hour to complete), and puts you into Bob’s brain as he points out bits of code he doesn’t like and refactors them.

Read more

April 15, 2014

Converting a static site from Middleman to Yeoman

This one time I inherited a static website built with Middleman. Middleman has the best of intentions, but I couldn’t get it running well. Some of its gem dependencies could not run on Windows, and I couldn’t get the live reload functionality working through Vagrant‘s port forwarding. I made the decision to change stacks.

Read more

January 3, 2014

Jan 1, 2014 WordPress Attack

A site I monitor saw 1185 requests from 94.138.x.x between Jan 01 05:32:41 & 06:21:09 UTC looking for non existent pages. This site runs on a small server, and WordPress tried to handle the errors in its slow and complicated way. As a result, Apache and MySQL were overloaded.

Read more

January 3, 2014

NodeJS setup tips for DevOps

These are steps I took to help secure a NodeJS web application and keep socket.io running reliably on Ubuntu 12.04 on an Amazon EC2 server.

Read more

August 29, 2013

Things I wish I knew about Android before starting my first Android app

All those member variables/fields you set while a user interacts with an activity are going to become null when the user rotates their screen. However, the views being managed by your activity will preserve themselves – whether they were visible, what text set in them, and some other properties. To preserve the info that will be lost to the screen rotation, store information by overriding public void onSaveInstanceState(Bundle outState), and restore it by pulling out out of the bundle passed into public void onCreate(Bundle instanceBundle).

Read more

June 6, 2013

Policy file for WordPress W3TC and S3-based CDNs

If you are using S3 as a CDN, you will need to give WordPress’ W3TC plugin access to your AWS account so it can upload files to S3 on behalf of you. The smart way to do this is to create a new AWS user who can only access what they need for W3TC to do its job. Who wants to store the keys to their whole AWS account in their WordPress based site? If that information is retrieved by a hacker, they could do tons of damage. If they only gain access to your site’s specific bucket, there is less damage to be done.

Read more

January 28, 2013

Command line cURL request with JSON

This is useful for testing out REST services that use JSON, like ones made with Restify and MongoDB. This command runs in Linux, OS X, or even Windows if you have cURL installed and included in your PATH variable.

Read more

August 29, 2012

Find old bash commands in Linux

Use a wicked one-liner last week, but forget what it was? Search your bash history with grep! If you remember part of the command, you may be able to dig it up.

Read more

August 29, 2012

List modified files with SVN in Linux

When the command svn status returns too much information, filter the output with grep. This line finds only modified files and leaves out deleted, missing, and unversioned files.

Read more

August 29, 2012

PEAR connection problems

Having trouble connecting to PEAR channels like pear.phpqatools.com, pear.phpunit.de, or pear.netpirates.net? I frequently see this error:

Read more

August 29, 2012

400 Bad Request error with C# Google Analytics Helper and Unity

If you find “400 Bad Request” errors in the Unity console while testing out the C# Google Analytics Helper within the Unity IDE, try removing spaces from the “page” parameter passed to the LogEvent and LogPage methods. This may help and get tracking requests flowing through to GA.

Read more