Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / gist:3319797
Created August 11, 2012 01:30
EE Mocha Port Questions

I ran into a few things working on the mocha port, these are the ones I was smart enough to write down but if the others come to me I'll let you know.

  1. Would it make sense to give both the preview and edit iframes a div with an id or at least give the bodies id's? It would make this simpler: https://github.com/OscarGodson/EpicEditor/blob/858425d10a8e23eb3303d4847b0781f09f7dce67/test/test.getElement.js#L40

  2. Why does the editor throw an error on multiple unloads instead of just ignoring it like load? Maybe we can just check to see if it's loaded and if not don't unload it. Thoughts?

@johnmdonahue
johnmdonahue / static_server.js
Created August 11, 2012 04:36 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
var http = require('http')
, url = require('url')
, path = require('path')
, fs = require('fs')
, port = process.argv[2] || 8888
http.createServer(function (request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri)
@johnmdonahue
johnmdonahue / iterm.itermcolors
Created August 16, 2012 18:48
iTerm2 Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.019607843831181526</real>
<key>Green Component</key>
<real>0.019607843831181526</real>
@johnmdonahue
johnmdonahue / static_server.js
Last active October 8, 2015 19:48 — forked from respectTheCode/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
/* Adapted from: https://gist.github.com/1926868 */
var http = require('http')
, url = require('url')
, path = require('path')
, fs = require('fs')
, mime = require('mime')
, port = process.argv[2] || 8888
http.createServer(function (request, response) {
@johnmdonahue
johnmdonahue / gist:5810470
Created June 18, 2013 23:33
REMOVE EMOJI FONT ⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡⚡
sudo rm System/Library/Fonts/Apple\ Color\ Emoji.ttf
@johnmdonahue
johnmdonahue / gist:5817460
Created June 19, 2013 19:51
Port redirect hack
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8000
@johnmdonahue
johnmdonahue / gist:5971940
Created July 11, 2013 02:07
git submodule rm
  1. Delete the relevant section from the .gitmodules file.
  2. Stage the .gitmodules changes git add .gitmodules
  3. Delete the relevant section from .git/config.
  4. Run git rm --cached path_to_submodule (no trailing slash)
  5. Run rm -rf .git/modules/submodule_name
  6. Commit
  7. Delete the now untracked submodule files
  8. rm -rf path_to_submodule