Copyright (c) 2011 Jed Schmidt
a small module for auto-importing modules in node.js.
require( "./autorequire" )
require.auto( <module-name> )
// | |
// My First IRC Bot | |
// | |
console.log("Bot Started...") | |
var irc = require('irc'); | |
//For storing globals | |
var MYBOT = {}; | |
//Channel to use |
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
# File is named as '.sh' for highlighting. Don't actually run this (hash bang removed). | |
# | |
# First of all, you should stop using cygwin and just use a VM or install linux. | |
# By continuing you acknowledge the fact your a nut. :-D | |
# | |
# If your having errors with Cygwin and NPM install packages such as: | |
# npm ERR! tar "-mvxpf" "-" "--no-same-owner" | |
# | |
# Do the following: |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
If you wish to compile the CS toolchain of version 2008q3 on OS X (Lion in my case, but should work on other versions), please do follow these instructions.
Firstly download the source tarball from Mentor site.
This comes with a particularly useless build script: arm-2008q3-66-arm-none-eabi.sh
I've collected all the links related to Backbone.js that I find useful. Most of these are well-built projects and epic guides (not ephemeral blog posts.) Please feel free to fork and even contribute.
These instructions work for the Raspberry Pi running Raspbian (hard float) and create a hardware optimized version of NodeJS for the Raspberry PI, (and include a working install and NPM!!!):
Install Raspbian - http://www.raspberrypi.org/downloads
Install the necessary dependecies:
sudo apt-get install git-core build-essential
(If you just installed git then you need to administer your git identity first, else adding the patches below will fail!!!)
[ | |
{"group":"US (Common)", | |
"zones":[ | |
{"value":"America/Puerto_Rico","name":"Puerto Rico (Atlantic)"}, | |
{"value":"America/New_York","name":"New York (Eastern)"}, | |
{"value":"America/Chicago","name":"Chicago (Central)"}, | |
{"value":"America/Denver","name":"Denver (Mountain)"}, | |
{"value":"America/Phoenix","name":"Phoenix (MST)"}, | |
{"value":"America/Los_Angeles","name":"Los Angeles (Pacific)"}, | |
{"value":"America/Anchorage","name":"Anchorage (Alaska)"}, |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.