Generate Custom SSH Keys for Developers on Your Amazon Instances

The process is pretty simple. Let’s say you use an ssh key (.pem) file generated by Amazon. However you use the same key on a few of your instances and you’d like to allow a developer access to only one at a time. To do that, you need to generate a custom ssh key for your developer to log into one machine: Generate a custom ssh key (private) Generate more...

09 Sep

Get the most recent commit hash

Posted by Mike Categories: Blog
Get the most recent commit hash

Sometimes you just need one line that says your most recent commit in git. You just want to make sure everything is up to date. It’s super simps. git rev-parse HEAD more...

27 Apr

How to Open a New Window From Menu Cocoa

Posted by Mike Categories: Blog
How to Open a New Window From Menu Cocoa

quick one today. The video shows you how to open a new nswindow from a drop down menu selection. It allows for the nib to be instantiated and call all of the expected “windowDidLoad” behavior.   more...

11 Apr

8 Bit Color or 256 Color Array

Posted by Mike Categories: Blog
8 Bit Color or 256 Color Array

I’m sending color to an arduino and I’d like to send the entire rgb value in one byte. It’s easy to translate this from rgb values. Something like: int color = ((b&255 & 0xC0)+((g&255 & 0xE0) >> 2)+((r & 0xE0) >> 5))&0xFF; But once you get that byte to the arduino, you need to convert it back to an RGB value more...

10 Apr

xCode Can’t Drag IBOutlets or IBActions

Posted by Mike Categories: Blog
xCode Can't Drag IBOutlets or IBActions

Sometimes life is simple, too simple. Sometimes you get stuck for a day and it was something totally ridiculous that you couldn’t figure out. This is one of those days. Doing IOS Development, I thought I had it down. Create a new UIView, create a new view controller class, and set the UIViewController’s class to the newly created class in more...

09 Apr

Amazon RDS Creating Functions in MySQL

Posted by Mike Categories: Blog
Amazon RDS Creating Functions in MySQL

Had a problem creating functions in MySQL with the standard user for an RDS instance on Amazon. For those who don’t know, Amazon RDS is a sweet place to host a remote database, kind of expensive but worth it if you are using a distributed system. Anyway… The problem is when you try to run something like: DROP FUNCTION IF EXISTS hello_world; DELIMITER more...

30 Mar

Add SSL to EC2 Instance

Posted by Mike Categories: Blog
Add SSL to EC2 Instance

You want https on your ec2 instance with nodejs? easy. First thing is first. There are new rules. You can’t get an ssl certificate anymore that assignes to an IP address (More here). If you don’t know what this means, don’t worry about it. I’ll walk your through. You’re going to need to set a few things up. First, set more...

All Your Autorotate Are Belong To UINavigationController

so if you’re like me, you usually don’t fuck around with screen orientation. You make an app to auto rotate. But if your building an app in a day for a pitch that scans barcodes and plays videos, and you don’t have full res images assets, basically screen shots. You have some pages that should auto rotate and some that shouldn’t. more...

How to make a UIScrollView Programmatically

Ok, so I’ve stilll never made this work in interface builder. But it’s not that hard to make it in code. You want to add a scroll view to the middle of your screen, in your view controller.m file: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. NSLog(@"viewDidLoad"); scrollView more...

25 Mar

Fastest Loops in Javascript

Posted by Mike Categories: Blog
Fastest Loops in Javascript

I’m always interesting in Javascript and which constructs perform better than others. There are alot of funky things about this language, but for loops always seem to be a moving target for me. I tend to stick with the regular var i = 0 loop, because it’s easy to understand: for(var i = 0, l = something.length; i < l, i++) { // do more...