example: http://halform.herokuapp.com/
#### Instructions ####################### | |
# | |
# Install Node, grunt-aglio and grunt-contrib-watch on your localhost | |
# Create this .js file in the folder that you want Grunt to watch for changes | |
# Replace "my_app" with your app name | |
# Intro.md, first.md and any .md files will be watched. The order that those will be concatenated is in the array => ["intro.md","first.md",'second.md'] | |
# | |
########################################## | |
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.
Here's how to build an app with something like CanJS and AMD-like modules (using steal). For this example app, consider a tree-like nested grid where you can select locations and get more information. The app might look something like:
IL | |
Chicago |
#!/bin/bash | |
# Uses a PID file to add daemon-like behavior to an arbitrary program. | |
################################################################################ | |
usage() { | |
echo "Usage: `basename $0` PROGRAM {start|stop|restart|force-stop|force-restart|status} [PIDFILE|PID]" >&2 | |
echo "Where: PROGRAM is an executable file." >&2 | |
echo " PIDFILE is the file that contains (or will contain) the PID." >&2 | |
echo " PID is a process id to use in place of a PIDFILE." >&2 | |
} |
The following is a VERY rough draft of an article I am working on for Alex MacCaw's @maccman's Book. It is very rough, but even now a worthwhile read. Suggestions / comments are very welcome! Please help me :-)
JavaScriptMVC (JMVC) is an open-source jQuery-based JavaScript framework. It is nearly a comprehensive (holistic) front-end development framework, packaging utilities for testing, dependency management, documentation, and a host of useful jQuery plugins.
Yet every part of JavaScriptMVC can be used without every other part, making the library lightweight. Its Class, Model, View, and Controller combined are only 7k minified and compressed, yet even they can be used independently. JavaScriptMVC's independence lets you start small and scale to meet the challenges of the most complex applications on the web.
This chapter covers only JavaScriptMVC's
<?php | |
namespace Doctrine\ORM\Tools\Console\Command; | |
use Symfony\Component\Console\Input\InputArgument, | |
Symfony\Component\Console\Input\InputOption, | |
Symfony\Component\Console; | |
use Doctrine\Common\DataFixtures\Executor\ORMExecutor; |
// Note that this uses my Pub/Sub implementation, which is slightly different than | |
// phiggins' in that jQuery custom events are used, and as such the first event handler | |
// argument passed is the event object. | |
// | |
// jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery | |
// https://gist.github.com/661855 | |
// The "traditional" way. |
/* | |
Tie lets you cross-bind form elements and controllers with models. | |
This means that by changing a model attribute, you it will | |
automatically update controllers or form elements. | |
This also means that if a 'change' event happens on the | |
element, it will automatically update the model attribute. | |
Lets see an example: | |
*/ |