Skip to content

Instantly share code, notes, and snippets.

@drakakisgeo
drakakisgeo / Gruntfile
Created July 25, 2014 19:20
Grunt setup for Aglio autocompile and merge .md files
#### 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']
#
##########################################
@mikekelly
mikekelly / an_example.md
Last active May 9, 2016 22:30
what forms could look like in halo
@domenic
domenic / promises.md
Last active June 24, 2024 03:11
You're Missing the Point of Promises

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.

You're Missing the Point of Promises

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.
@justinbmeyer
justinbmeyer / observeOverPub-Sub.md
Created August 17, 2012 15:49
Observes over Pub-Sub

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
@rodw
rodw / pid-file-daemon.sh
Created August 14, 2012 01:53
Bash script that uses a PID file to add daemon-like start/stop/status behavior to an arbitrary program.
#!/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
}
@justinbmeyer
justinbmeyer / bbuicanjs.md
Created June 22, 2012 16:47
BackboneUI done with CanJS

Button

<button><%= coffee.attr('roaster') %></button>

Checkbox

<input type='checkbox'
@jupiterjs
jupiterjs / JavaScriptMVC.md
Created May 24, 2011 16:58 — forked from moschel/JavaScriptMVC.md
JavaScriptMVC Overview

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 :-)

Introduction

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 $.Class, $.Model, $.View, and $.Controller. The following describes each component:

anonymous
anonymous / gist:980546
Created May 19, 2011 11:13
<?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;
@cowboy
cowboy / pubsub-demo.js
Created December 16, 2010 20:04 — forked from rmurphey/pubsub-demo.js
Two approaches: "Traditional" vs Pub/Sub (via rmurphey)
// 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.
@jupiterjs
jupiterjs / tie.js
Created December 8, 2010 09:14
Demonstrating some of tie's functionality.
/*
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:
*/