Skip to content

Instantly share code, notes, and snippets.

@johnmdonahue
johnmdonahue / everyauth-github-shim.js
Created June 12, 2012 20:04
GitHub API v3 everyauth Shim
var everyauth = require('everyauth')
everyauth.github
.apiHost('https://api.github.com')
.fetchOAuthUser(function (accessToken) {
var p = this.Promise()
this.oauth.get(this.apiHost() + '/user', accessToken, function (err, data) {
if (err) {
@johnmdonahue
johnmdonahue / contributing.md
Created June 3, 2012 16:11
Revised EE Contributing Wiki

#Contributing to EpicEditor

Suggestions for contributing to EpicEditor. No fix or feature is too small. Thanks for contributing!

##Issues

Before submitting a bug report or feature request, please check to make sure it hasn't already been submitted. You can indicate support for an existing issue by commenting on that issue. When submitting a bug, please include any details necessary to reproduce it (e.g. browser, OS etc). And if you're feeling frisky, include a failing test!

@johnmdonahue
johnmdonahue / spec.js
Created May 29, 2012 03:33
WIP of EE spec rewrite
foounit.require('/epiceditor/js/epiceditor')
// Set the base path globally for ee since its not in default location
var BASEPATH = '/epiceditor/';
// Start with a fresh local storage
localStorage.clear();
// Helper to generate random number for instances
function _rnd() {
@johnmdonahue
johnmdonahue / gist:2671849
Created May 13, 2012 02:52
How to handle pre-req flow using Jake.exec
// I'm trying to accomplish something like below.
// Is there a best practice for using Jake.exec in a pre-req that's also a stand alone task?
// The default task below will execute in arbitrary order - I am assuming because exec is async.
// Seems like the invoke/complete pattern could be used but using pre-reqs I'm at a loss.
// Are there other options to enforce procedure order here?
var spawn = require('child_process').spawn
desc('Do thing 1');
task('thing1', [], function () {
@johnmdonahue
johnmdonahue / gist:2668813
Created May 12, 2012 20:29
RE: Moving EpicEditor wiki pages to docs

My initial thoughts on this are that contribution guidelines could add unnecessary clutter to the docs. My guess is that the ratio of users to those looking to contribute is probably tiny (100:1, if that). The primary use of epiceditor.com in my mind is to "sell" the concept and provide basic usage and API. It's a resource for users more than contributors and keeping it restricted to this I think might help searchability and readabilty. As a front-end project, many users may not even be familiar with github beyond a resource for code. Those who are interested should have no problem finding the repo on github via the fork ribbon, or the contributions wiki page already linked. On another level, leaving contribution guidelines to the wiki further encourages contributions as users can directly contribute to the wiki w/o pull requests (e.g. create a page called "Easy jQuery Integration", or "Extending Marked" etc). These types of pages are perfect for the wiki and don't require pull requests or builds to modif

@johnmdonahue
johnmdonahue / command-t.md
Created March 26, 2012 02:10
Command-T setup instructions

Command-T

For the command-t plugin you will need to be running a version of Vim with ruby support (like MacVim or use this Hombrew-Alt install). To check this:

vim --version | ack ruby

If you see +ruby you are all set, -ruby and you will need to recompile.

@johnmdonahue
johnmdonahue / contributing.md
Created March 25, 2012 03:58
Draft Contributing Guide

Contributing to EpicEditor

Suggestions for contributing to EpicEditor. For feature and bug fix contributions we try to follow Vincent Driessen's git branching model. No fix or feature is too small. Thanks for contributing.

Issues

Before submitting a bug report or feature request, please check to make sure it hasn't already been submitted. You can indicate support for an existing issue by commenting on that issue. When submitting a bug, please include any details necessary to reproduce it (e.g. browser, OS etc). And if you're feeling frisky, including a failing test is super helpful.

Pull requests

@johnmdonahue
johnmdonahue / .gitignore
Created March 21, 2012 00:07
Jekyll config
.DS_STORE
_drafts/
_site/
*~
assets
@johnmdonahue
johnmdonahue / gist:2029308
Created March 13, 2012 15:03
Revised EpicEditor JSHint Config
{
"asi" : true // if automatic semicolon insertion should be tolerated
, "bitwise" : true // if bitwise operators should not be allowed
, "boss" : true // if advanced usage of assignments should be allowed
, "browser" : true // if the standard browser globals should be predefined
, "couch" : false // if CouchDB globals should be predefined
, "curly" : true // if curly braces around all blocks should be required
, "debug" : false // if debugger statements should be allowed
, "devel" : false // if logging globals should be predefined (console, alert, etc.)
, "dojo" : false // if Dojo Toolkit globals should be predefined