eric@edub:~/projects/projects/experiments $ tower new myApp
path.existsSync is now called `fs.existsSync`.
create : myApp/.gitignore
create : myApp/.npmignore
create : myApp/.slugignore
create : myApp/Cakefile
create : myApp/app/client/config/bootstrap.coffee
create : myApp/app/client/stylesheets/application.styl
create : myApp/app/client/controllers/applicationController.coffee
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example view implements a simple dragging for mouse events. | |
Wall.DevView = Ember.View.extend | |
mouseDown: (ev) -> | |
ev.dispatcher.lock @, 'mouseMove', 'mouseUp' | |
@_mouseDown = @$().offset() | |
@_mouseDown.pageX = ev.pageX | |
@_mouseDown.pageY = ev.pageY | |
@_mouseDown.dispatcher = ev.dispatcher | |
console.log 'mouseDown' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<link rel="stylesheet" href="../libs/mocha.css" type="text/css" media="screen" title="no title" charset="utf-8"> | |
</head> | |
<body> | |
<div id="mocha"></div> | |
<script src="../libs/mocha.js" type="text/javascript" charset="utf-8"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aug 30 11:02:59 <e_dub> luckysmack, what editor do you use? | |
Aug 30 11:03:31 <luckysmack> for basic stuff I use sublime text. but my main ide is idea. | |
Aug 30 11:03:47 <e_dub> https://github.com/wuub/SublimeREPL | |
Aug 30 11:03:55 <luckysmack> http://www.jetbrains.com/idea/http://www.jetbrains.com/idea/ | |
Aug 30 11:04:15 <e_dub> coffeescript REPL with syntax highlighting and autocompletion , etc | |
Aug 30 11:04:25 <luckysmack> oh ive seen that before. but never really looked at it. | |
Aug 30 11:04:34 <luckysmack> nice | |
Aug 30 11:05:07 <e_dub> it works like a charm, of course I already use sublime's ability to run arbitrary code, build stuff, etc, but this is really sweet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# API Documentation at http://api.wikia.com/wiki/LyricWiki_API | |
require 'open-uri' | |
require 'json' | |
require 'tmpdir' | |
ARTIST = "Johnny Cash" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function preflightApi(){ | |
return function preflightApi(req, res, next){ | |
//this is where the magic happens | |
res.header('Access-Control-Allow-Origin', '*'); | |
res.header('Access-Control-Allow-Methods', 'POST, GET, PUT, DELETE, OPTIONS'); | |
res.header('Access-Control-Allow-Headers', 'User-Agent, Accept-Language, Accept-Encoding, Accept-Charset, Connection, Content-Length, Origin, Pragma, Accept-Charset, Cache-Control, Accept, Content-Type, Sessionid'); | |
res.header('Access-Control-Max-Age', '1000'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Scan the given `str` returning tokens. | |
* | |
* @param {String} str | |
* @return {Array} | |
* @api public | |
*/ | |
module.exports = function(str) { | |
var indents = [0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ifneq (,$(findstring /cygdrive/,$(PATH))) | |
UNAME := Cygwin | |
else | |
ifneq (,$(findstring WINDOWS,$(PATH))) | |
UNAME := Windows | |
else | |
UNAME := $(shell uname -s) | |
endif | |
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Relies on jQuery, underscore.js, Async.js (https://github.com/caolan/async), and zip.js (http://gildas-lormeau.github.com/zip.js). | |
Tested only in Chrome on OS X. | |
Call xlsxParser.parse(file) where file is an instance of File. For example (untested): | |
document.ondrop = function(e) { | |
var file = e.dataTransfer.files[0]; | |
excelParser.parse(file).then(function(data) { | |
console.log(data); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var crypto = require('crypto') | |
var request = require('request') | |
var url = require('url') | |
var irc = require('./IRC/lib/irc') | |
var ntwitter = require('ntwitter') | |
var twitter = require('twitter') | |
var qs = require('querystring') | |
// separate accounts to post and search because twitter was sending me 500s | |
// when I tried to use the same oauth creds for both twitter() and ntwitter() |