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...
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...
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...
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...
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...
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...
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...
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...
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...
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...

