I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
This is a small collection of scripts showing how to use require.js. It's only one of several ways of setting up a require.js project, but it's enough to get started.
At its core, require.js is about three things:
- Dependency management
- Modularity
- Dynamic script loading
The following files show how these are achieved.
BEFORE YOU CONTINUE:
- Now, Meteor runs in any Windows without any line of this tutorial. Just download the Meteor binary! Yay!!
mrtis no longer used with Meteor 1.0
These days some people were discussing at meteor-talk group about running Meteor at Windows and I’ve recommended them using Vagrant. It’s a very developer-friendly piece of software that creates a virtual machine (VM) which let you run any operating system wanted and connect to it without big efforts of configuration (just make the initial installation and you have it working).
Many packages (I've tested) for running Meteor+Vagrant fails because Meteor writes its mongodb file and also other files inside local build folder into a shared folder between the Windows host and the Linux guest, and it simply does not work. So I've put my brain to work and found a solution: do symlinks inside the VM (but do not use ln. Use mount so git can follow it). It’s covered on
| import sys | |
| from twisted.internet import defer, endpoints, protocol, reactor, task | |
| from twisted.python import log | |
| from twisted.words.protocols import irc | |
| class MyFirstIRCProtocol(irc.IRCClient): | |
| nickname = 'MyFirstIrcBot' |
| 13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF | |
| | FUCKIN PUSSIES | |
| 13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS | |
| 13:16 <luite> | hello | |
| 13:16 <ChongLi> | somebody has a mental illness! | |
| 13:16 <merijn> | Wow...I suddenly see the error of my ways and feel | |
| | compelled to write Node.js! | |
| 13:16 <genisage> | hi | |
| 13:16 <luite> | you might be pleased to learn that you can compile | |
| | haskell to javascript now |
| class LimitedAdminInlineMixin(object): | |
| """ | |
| InlineAdmin mixin limiting the selection of related items according to | |
| criteria which can depend on the current parent object being edited. | |
| A typical use case would be selecting a subset of related items from | |
| other inlines, ie. images, to have some relation to other inlines. | |
| Use as follows:: |