Using Hubot with slack

I have been playing around with hubot and slack. This post describes the steps I used to setup a hubot that uses the slack adapter.

Read More...

Get twitter t.co URL length using Tweepy

The twitter documentation indicates that t.co lengths can be obtained from the help/configuration API. This post gives an example of how to use the Tweepy Python library to obtain those values.

Read More...

Cron and Python virtualenv

I created a simple twitter bot that consumes data from a REST API and tweets on certain conditions. The data from the REST API changes infrequently so the bot is set to run every half hour. The bot is written in python and uses a virtualenv so the crontab entry needs to use that virtualenv as well. This post describes what I did to achieve that.

Read More...

How to create a script package for hubot

I recently created a script package (hubot-lmgtfy) for hubot. This post describes what I did to create the package.

Read More...

unmet peer dependency build warning when creating a hubot script package

I created a script package for hubot and followed the developer guide for publishing a package. I received an unmet peer dependency build warning when I did the install. This post describes what that is.

Read More...

Running CoffeeScript Mocha tests on Travis CI

Travis CI will run npm test by default, so you will need to add the following to your package.json file:

Read More...

Debugging npm - "Error: Cannot find module xxx"

I recently had an issue where a CoffeeScript unit test I had written started throwing “Error: Cannot find module”. Here are the steps I used to resolve the issue.

Read More...

formatting code with jekyll 3 and bootstrap

The release of Jekyll version 3 changed the default syntax highlighter from Pygments to Rouge. In a previous blog entry I described how I formatted code snippets for this blog which uses Jekyll version 2, Pygments and Bootstrap. That code does not work with the new version of Jekyll. This blog post will describe what I did to format code snippets when using Jekyll version 3 and Bootstrap version 3.

Read More...

Notes From Oracle's Java 8 MOOC: Lambdas And Streams

I recently finished Oracle’s Java 8 MOOC: Lamdbas And Streams class. This was my first introduction to Java 8. The following are my notes from the class.

Read More...

Comparing integers using Integer.compare vs subtraction

TL;DR: Use Integer.compare to avoid overflow that can occur when subtracting two integers.

Read More...