View index.js
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var mongoose = require('mongoose');
var _ = require('lodash');
// Set up a Schema with some required elements, and a field with an array
var ThingSchema = new mongoose.Schema({
name: {
type: String,
required: true
View .vimrc
" _
" ___ __ _ __ _| | ___
" / _ \/ _` |/ _` | |/ _ \
"| __/ (_| | (_| | | __/
" \___|\__,_|\__, |_|\___|
" |___/
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
View build.js
/**
* Build a group of targets based on a prefix
*
* Ex: grunt build:less:debug
*
* This would run all less targets that begin with "debug_":
* debug_web
* debug_sidebar
* debug_self_help
* debug_self_help_theme
View gist:7bf2ecffe0a223ac2c4b
// Totally intolerable
var express = require('express')
, routes = require('./routes')
, http = require('http');
// Better
var express = require('express'),
routes = require('./routes'),
http = require('http');
View gist:9210964
================================================================================
Error executing action `start` on resource 'service[postfix]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of /sbin/service postfix start ----
STDOUT: Starting postfix: [FAILED]
View gist:9210747
================================================================================
Error executing action `upgrade` on resource 'yum_package[php-mysql]'
================================================================================
Chef::Exceptions::Exec
----------------------
returned 1, expected 0
View prevent-orphans
<h2><a class="title" href="{{ post.url }}">
{% assign titleWords = post.title | split:&nbsp; %}
{% for word in titleWords %}{% if forloop.last %}&nbsp;{% else %} {% endif %}{{ word }}{% endfor %}
</a></h2>
View gist:2789974
define([], function () {
var Wiser = window.Wiser || {};
if (typeof Wiser === 'object') {
Wiser.utils = Wiser.utils || {};
if (typeof Wiser.utils === 'object') {
/* WiserTogether Utility Functions
*
*/
View Array.prototype.indexOf()
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function(obj, start) {
    for (var i = (start || 0), j = this.length; i < j; i++) {
        if (this[i] === obj) { return i; }
      }
      return -1;
}
}