Skip to content

Instantly share code, notes, and snippets.

View bigeasy's full-sized avatar

Alan Gutierrez bigeasy

  • New Orleans, LA
View GitHub Profile
@bigeasy
bigeasy / output.txt
Created June 28, 2011 15:01
Connect to jsDAV from OS X
using dir: /home/alan/var/dossier/locks
jsDAV server running on http://192.168.56.12:8048
REQUEST START: / 1
INFO: invoking method 'OPTIONS'
INFO: sending header: 200 { Allow: 'OPTIONS,GET,HEAD,DELETE,PROPFIND,PUT,PROPPATCH,COPY,MOVE,REPORT,LOCK,UNLOCK',
'MS-Author-Via': 'DAV',
'Accept-Ranges': 'bytes',
'X-jsDAV-Version': undefined,
'Content-Length': 0,
DAV: '1,3,extended-mkcol,2' }
@bigeasy
bigeasy / async.html.eco
Created April 16, 2011 15:26
Async Eco Template
<html>
<head>
<title>This is a title.</title>
</head>
<body>
<%!= @load "projects", (data) => %>
<h2>Projects</h2>
<% for project in data.projects: %>
<%!= @load "assignments", (data) => %>
<p>I should print out that assignment here.</p>
@bigeasy
bigeasy / libxml2.rb
Created April 10, 2011 15:59
the libxml2 Homebrew brew with "--with-mem-debug" added
require 'formula'
class Libxml2 < Formula
url 'ftp://xmlsoft.org/libxml2/libxml2-2.7.7.tar.gz'
homepage 'http://xmlsoft.org'
md5 '9abc9959823ca9ff904f1fbcf21df066'
keg_only :provided_by_osx
fails_with_llvm "Undefined symbols when linking", :build => "2326"
@bigeasy
bigeasy / server.coffee
Created March 29, 2011 17:55
Connect Stack Trace (Short, Useless)
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: ECONNREFUSED, Connection refused
at Socket._onConnect (net.js:599:18)
at IOWatcher.onWritable [as callback] (net.js:186:12)
@bigeasy
bigeasy / parse.js
Created March 28, 2011 04:28
Parse an HTTP Cookie
function setCookie(cookies, value) {
var values = value.split(/;\s+/);
var split = values.shift().split(/=/);
var key = split.shift();
cookies[key] = { value: split.join("=") };
values.forEach(function (n) {
var split = n.split(/=/);
var property = split.shift();
cookies[key][property] = split.length == 0 ? true : split.join("\n");
});
@bigeasy
bigeasy / configure.out
Created March 27, 2011 23:42
Build Node.js v0.4.4 on Fedora 13 x86
[alan@dvor:~/src/node-v0.4.4$] ./configure --prefix=/opt
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc or cc : /usr/bin/gcc
Checking for gcc : ok
Checking for library dl : yes
Checking for openssl : yes
@bigeasy
bigeasy / mysql.coffee
Created October 14, 2010 23:02
MySQL Utilities
fs = require "fs"
Client = require("mysql").Client
createClient = ->
client = new Client()
client.user = "user"
client.password = "password"
client.database = "database"
client
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
#
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
#
# Modified to make a template file for a multi-binary package with separated
[alan@piran:~/git/ecma/stack$] coffee sudo.coffee
undefinedudo
[alan@piran:~/git/ecma/stack$]

CoffeeScript Project Structure

One of the great benefits of picking up on Coffee on the 16th of this month, two days ago, has been that the onerous task of establishing a development enviornment was simplified by simply copying the CoffeeScript project structure.

Starting on the 16th, and starting with getting Vows to work for testing and Expresso to work for coverage of JavaScript, I created beautiful literate programming articles using docco which gave me an incredible sense of accomplishment. I created an Node.js executable, created an npm installation,