Articles by Scott Motte

Hacker in LA. I believe the future is bright. It's up to us to build it - as programmers we get a big say. Follow me on twitter @motdotla.

Follow Scotty

Create your First Heroku Buildpack


Did you know you can install custom software on Heroku? You can, using buildpacks. In this tutorial, I show you how to write a custom buildpack. I’ll use MuPDF, a handy utility to convert PDFs to PNGs, as an example. Replace the MuPDF parts with the binary you want. Create the Binary Before we can create the buildpack, we need to create the binary on the Heroku server environment. Make the binary. Begin by creating a heroku app. heroku create buildpack-stager heroku run bash –app buildpack-stager Then ssh into the server. heroku run bash –app buildpack-stager Make the binary. curl -O tar -xvzf mupdf-1.3-source.tar.gz cd mupdf-1.3-source make DESTDIR=/app make install Cool, that installs everything to /app/usr/local. Archive the binary. Read More ›

Hello World with Apex


Salesforce is extremely popular software. It is used by large and small companies alike, and its Salesforce1 Platform allows you as a developer to create applications in the cloud. You write code on the Salesforce1 Platform in a language called Apex. It is similar to Java. Most of the tutorials for getting started with Apex use the IDE. I’m not a fan of IDEs. In this tutorial, I am going to show you how to write an Apex Hello World app without using an IDE. Let’s begin. Setup Create a developer account. You’ll receive an email from Salesforce with a link to confirm. Click it. On the next screen, set your password. Yeah, it’s an odd flow, Read More ›

Host Your Own Disposable Email App


I like Mailinator. I use it all the time. However, it has had some downtime recently at inopportune times for me. My friend Joël had the idea of creating one’s own disposable email like Mailinator’s. In this post, I’m going to show you how to do just that. It turns out it is pretty easy using modern tools. Generate a RequestBin Visit RequestBin and create a bin. Set Up the Inbound Webhook Visit SendGrid’s Parse Webhook Settings. Set the hostname to Set the url to the url of the bin you created above. Send an Email Go to your email and send an email to Refresh the request bin page you generated in Step 1. That’s it. You’re Read More ›

Open Source: Pull Request Driven Development


Pull Requests are my favorite feature of GitHub. They are the way I prefer to do development. Avoid Communication Breakdown There is necessarily a lot of discussion that happens when writing code. On a team of one, this discussion happens in your brain. On a local team of two or three, it happens IRL. These approaches work ok, but they break down when the team is remote or four-plus people. So, how do you avoid this breakdown in communication? Often, teams turn to an external tool like Basecamp. I recommend against that. Those conversations live too far away from where the code lives. Your brain and mouse have to travel between each. The better way is to use GitHub’s Pull Read More ›

How to Launch a Rocket with an Arduino and Node.js


Recently, I had the chance to teach kids how to launch rockets using Arduinos. As you might guess, it was a blast. We wrote a countdown program using Node.js, hooked the program up to an Arduino, and wired up the Arduino. This sent an electrical signal to the rocket engine, igniting it. In this tutorial, I show you how to do the same. Prerequisites You will need the following materials: Arduino Mega 2560 Board. You could use a different Arduino board, but I recommend the Mega. NodeJS installed on your computer. It is relatively easy to install. You can go here to install it. 9 Volt Battery and a 9 Volt Battery clip. Breadboard and Jumper Wires A 5 Volt Read More ›

Remember to Floss With an Interactive Reminder Email


It’s been over a month since New Year’s Day, but I’m still trying to keep some of my New Year’s resolutions. I’ve found the best way to keep them is to have someone remind you—nag you, really. Likely, your friends don’t want to spend their free moments nagging you though. So, let’s have SendGrid do it instead. Resolve to Be a Flosser You’re likely familiar with sending email through SendGrid, but we can also receive it via the Inbound Parse Webhook. We can combine the two to act like a person reminding us of our New Year’s resolution. How? We’ll send an email each day asking if we did our New Year’s resolution. If we reply “yes,” the app will Read More ›

Long Live the Informal Hackathon


The Major League Hackathons—Penn Apps, MHacks, BoilerMake, and HackTech–are great. Go to these. But go to the small hackathons, too. Good things come from the small, informal hackathons. And you can even easily organize one yourself. The very first hackathon was small. I’m stating the obvious, but hackathons did not start as large organized events with multiple sponsors. They started as informal get-togethers. People like you, the makers and creators, got together to create something cool. Where to Start Hold informal hackathons. Get a handful of friends, pick a venue like your co-working space or apartment, and pitch in for some pizza and soda, invite others, and hack for 24 hours. Publicize your event on, tweet it out, and Read More ›

Keep Your New Year’s Resolution to Code More


The year 2014 is here and with it New Year’s resolutions. My New Year’s resolution is to commit more open source code. Little apps like this one by Nick Quinlan are helping to keep that at the forefront of my mind. Specifically, I want to complete a 30 day GitHub commit streak. I’m bad at remembering to commit so I built an application to remind me. It’s called github-streaker. It checks your GitHub commits each day. If you haven’t made any commits that day, it sends you a reminder email using SendGrid. You can deploy github-streaker in just a few minutes to Heroku. Here are the steps: git clone cd github-streaker heroku create heroku addons:add scheduler heroku addons:add sendgrid Read More ›

A Sinatra and Heroku Application Template in 20 Lines


Heroku is a great web publishing platform. Additionally, Sinatra is a great ruby web framework. In this post, I’ll show you how to quickly combine the two. I have created a sinatra-heroku-template app to make it easy on you. All files combined, it is only 20 lines of code. Do the following to get it up and running. git clone git:// gem install bundler bundle heroku create yourwebapp git push heroku master bundle exec heroku open That’s it. You now have a bare bones Ruby app running in production on Heroku. Add your own code as necessary. Here’s a breakdown the file structure: app.rb defines your routes and is the core of your application boots your app Gemfile defines Read More ›

Get Going with Go and Redis


Go is a promising language. It’s a strong replacement for Java, it’s similarly productive to writing Python, and it is an excellent tool for writing servers. I’m starting to dive into it in my spare time, and in this blog post I will show you the basics of getting started with Go and Redis together. This tutorial assumes you’re running a flavor of Mac OS X and are comfortable with Terminal. Setup Install Redis Run the following commands on most *nix command lines to download, unpack and install Redis: wget tar xvzf redis-stable.tar.gz cd redis-stable make sudo make install Install Go Install Go. As of writing, this was the latest version for Mac. (You can find the list of all Read More ›

Let’s Deprecate the Password: Email-only Authentication

Best Practices, Product, Technical

Passwords suck. They are hard to remember. The average person re-uses the same password across the majority of their accounts. Can you blame them? It’s easier, and people have lives to live – not passwords to manage. It’s mainly the technorati that use tools like LastPass or 1Password. Passwords also tend to never expire. It is rare a site requires you to change your password – and it’s discouragingly user un-friendly when they do. What if we could remove the password? That would solve the above problems. Let’s try. Introducing Handshake.js I’ve built a solution called Handshake.js that is an attempt at this. It is open source. It works like this. First, you place a small script tag into your Read More ›