Category Archives: Code Solutions

Automatically Terraform Elasticsearch Cluster in AWS

Terraform Elasticsearch in Amazon Web Services The elasticsearch cluster needs to know the seed ip addresses, which makes it a little bit tricker to do in terraform. We actually need to do have two separate ec2 declarations. The second batch will grab the first batches ip addresses. The userdata automatically will install and set up […]

C Sharp delegate function in Java

Porting from C# to Java – The Delegate The delegate function is kind of cool in C# land. It allows you to pass a bunch of functions as a parameter. Java has a handful of different ways you can do this. I personally like just passing an object that implements Runnable and then have an […]

How To Build An API

What is an API API stands for application program interface. In a nutshell an API is a way for external applications to access information and queries from your program. Twitter for example has a a REST API that allows you to access all types of data from twitter. REST API’s are among the most common types of […]

Using groovy closures in Spock where blocks

Groovy Spock vs Java jUnit Because Spock is just jUnit under the hood we can do everything we can in jUnit and more because Spock uses groovy. One aspect of the jUnit test framework that most people don’t take advantage of is using parameterized classes – making the test class be test driven. The best part […]

Make Your Own Website Scraper

Description of a website scraper I recently did a project where I needed to scrape a subset of webpages from the internet. Back in the 1990s all websites were pretty much straight up html, which makes crawling them and getting their data pretty easy. All you needed was to grab the html files and run […]

Custom PS2 Keyboard GPIO for Spartan 6 Microblaze

Description This is an old post I never finished. I just thought I would at least share the code for the project. I made a keyboard interface with PS2 that plugged into the Spartan 6 Microblaze. You will need to make sure you have the right voltage and resistors in the right place. There is […]

Yeoman’s Gruntfile.js with html5 hashbang

Description Recently I worked on trying to make my angular application crawlable by google robots. In order to accomplish this I moved my application to html5. The problem however was all sites needed to be redirected from foo.com/newpage to foo.com/#!/newpage. This is required in order to load all the css and javascript for the page. […]

Async functions in AngularJS to behave synchronously

Description Having a background in server side code entering the world of javascript’s asynchronous functional programming took a bit to wrap my head around and understand. Angular has some awesome libraries that let you make rest endpoint requests using $http module. There was a scenario I ran into recently where I needed to make a […]

How to become a software developer

How to become a software developer I am a software engineer and I often have people, whether they are in marketing, customer support, business development, or any other various positions in companies I have worked for, ask me “How to become a software developer?” So you want to learn to code. One of my favorite […]

Multiple environments through GEB

I’ve recently been experimenting with GEB, which is a selenium framework that uses the groovy language. One of first challenges I encountered was trying to switch between multiple environments, instances, subdomains, or base urls. GEB uses a config file called GebConfig.groovy that is a standard groovy configuration file. This file is read by the ConfigSlurper […]