09 May

Holy $hit RDS

Posted by Mike Categories: Blog
Holy $hit RDS

So my life has been changed. Here’s why: I was choosing platforms partially because of my database structure. I’d go with PHP if I had a sql database, or nodeJS if I could use Mongo. No more. Just use Amazon RDS for your sql tables and it makes you platform agnosting. I can easily use it with nodejs instance running on heroku with almost more...

25 Apr

Raspberry Pi – The 5 Minute Setup

Posted by Mike Categories: Blog
Raspberry Pi - The 5 Minute Setup

I’ll just dive in. Note: this is a mac only tutorial. SD Card You need to flash an sd card with the latest distro of raspbian. Don’t worry about it, just do it. Download a copy of raspbian. Unzip it on your desktop and do the following… Open an terminal and type df -h Look at what you have. Then insert your sd card and do the same more...

NodeJS on Raspberry Pi named NodeJS Instead of Node

So you followed the instructions and installed nodejs from the repositories on wheezy. The problem is, there’s already a package named node in the sources. So according to binary naming convention, nodeJS gets renamed to “nodejs”. You can tell if you have this problem by simply typing node -v # then type nodejs -v If you get an error more...

24 Apr

Install the latest version of NodeJS

Posted by Mike Categories: Blog
Install the latest version of NodeJS

There are alot of theories out there on how to install the latest version of node. I prefer the following: npm install n -g n 0.10.5 Or whatever the latest version is… more...

28 Mar

Splitting Javascript Loops

Posted by Mike Categories: Blog
Splitting Javascript Loops

There’s a programming trick, I was unaware of so I thought I’d share… In Javascript for example, it’s single threaded. Which means you don’t want to do something like this: for(var i =0; i < 1000000; i++) { // do lots of stuff } That’s because Javascript will try and complete the process all at once, meaning more...

26 Mar

NodeJS Dynamic Eventing

Posted by Mike Categories: Blog
NodeJS Dynamic Eventing

So here’s something… I was trying to define things so I can key/value query later in nodeJS. I have an array of usernames. Then I try and create custom end points using nodeJS and express to customize a json return. If you pull down the code and run it you’ll see what I mean: var FOLLOWS = new Array('GSPBetaGroup', 'FreedomRiders1'); var more...

26 Mar

Javascript Associative Arrays?

Posted by Mike Categories: Blog
Javascript Associative Arrays?

Ok, so first off, everything (I mean EVERYTHING) in Javascript is an object. So there are no such things as “Associative arrays”. Let’s say you’re coming from PHP and you want to target something by it’s dynamically generated name. You might say: $things = array(); $things["stuff"] = 123; $things["otherthings"] = "more more...

25 Mar

Free Up Some RAM Raspberry Pi

Posted by Mike Categories: Blog
Free Up Some RAM Raspberry Pi

short example, let’s say your memory is low. You can find out by typing free -h you can clear some of this up with the following sync echo 3 > /proc/sys/vm/drop_caches That’s it, super simple more...

25 Mar

Out of Memory? Raspberry Pi

Posted by Mike Categories: Blog
Out of Memory? Raspberry Pi

If you’re like me and ordered raspbian preinstalled on a 4gig card for model B pi, then you are also like me and have installed maybe two packages before you can’t run sudo apt-get upgrade You end up returning this error: You don't have enough free space in /var/cache/apt/archives/. So what do we do? Well I just ordered another 16 gig card, more...

24 Mar

Wifi on Your Raspberry Pi?

Posted by Mike Categories: Blog
Wifi on Your Raspberry Pi?

So you just bought your pi with wheezy and you’ve purched a usb dongle… First off, you should upgrade all your shit…always, unless you have crazy stuff that depends on other stuff being old and stuff… sudo apt-get update sudo apt-get upgrade Next reboot your pi. sudo reboot Have a look around then alter: sudo nano /etc/network/interfaces If more...