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
#!/bin/sh -e | |
# Usage: license | |
# Prints an MIT license. | |
# | |
# $ license > COPYING | |
#!/bin/sh | |
echo "Copyright (c) `date +%Y` Ian Alexander Wood | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the |
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
daemon off; | |
worker_processes 2; | |
events { | |
worker_connections 8192; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; |
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 http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>ClarkParker Node experiment</title> | |
<link rel="stylesheet" href="css/application.css" type="text/css"> | |
</head> | |
<body> | |
<h1>YOOOhoooo</h1> | |
<script src="http://cdn.socket.io/stable/socket.io.js"></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
process.addListener('uncaughtException', function(err, stack) { | |
console.log('-------------------'); | |
console.log('Exception: ' + err); | |
console.log(err.stack); | |
console.log('-------------------'); | |
}); | |
var http = require('http'), | |
io = require('socket.io'), | |
sys = require('sys'), |
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
class Person | |
include Mongoid::Document | |
include Mongoid::Timestamps | |
field :name, :type => String | |
key :name | |
references_many :books, :dependent => :destroy | |
accepts_nested_attributes_for :books | |
end | |
class Book |
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
brew install -v io 10:56 | |
==> Build Environment | |
CC: /usr/bin/cc => /usr/bin/gcc-4.2 | |
CXX: /usr/bin/c++ => /usr/bin/c++-4.2 | |
LD: /usr/bin/cc => /usr/bin/gcc-4.2 | |
CFLAGS: -O3 -march=core2 -msse4.1 -w -pipe | |
CXXFLAGS: -O3 -march=core2 -msse4.1 -w -pipe | |
MAKEFLAGS: -j2 | |
/usr/local/bin/git | |
==> Cloning git://github.com/stevedekorte/io.git |
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
brew doctor 11:00 | |
Your OS X is ripe for brewing. | |
Any troubles you may be experiencing are likely purely psychosomatic. |
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
server { | |
server_name explore.reviewomatic.dev.gov.uk; | |
location / { | |
proxy_http_version 1.1; | |
proxy_pass http://127.0.0.1:8096; | |
} | |
} | |
server { | |
server_name reviewomatic.dev.gov.uk; |
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
Started POST "/tags" for 127.0.0.1 at 2012-08-10 10:53:28 +0100 | |
Processing by TagsController#create as HTML | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"7vAFwr9dYvsaEfzrq02W+lyfu+p74Hs40xzh+vHqhLw=", "tag"=>{"whole_tag"=>"batman"}, "commit"=>"Create Tag"} | |
MONGODB (0ms) migratorator_development['system.namespaces'].find({}) | |
MONGODB (1ms) migratorator_development['users'].find({:uid=>"K5dMhyR8ilZ8o9-qSJg7gA"}).limit(-1).sort([[:_id, :asc]]) | |
MONGODB (0ms) migratorator_development['system.namespaces'].find({}) | |
MONGODB (0ms) migratorator_development['$cmd'].find({"count"=>"tags", "query"=>{:name=>"batman", :group=>nil}, "fields"=>nil}).limit(-1) | |
MONGODB (0ms) migratorator_development['tags'].insert([{"mapping_ids"=>[], "_id"=>BSON::ObjectId('5024da18ca3b2c0fdc000008'), "group"=>nil, "name"=>"batman"}]) | |
Redirected to http://migratorator.dev.gov.uk/tags | |
Completed 302 Found in 150ms |
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
commentCount: function() { | |
var counter = 0; | |
var discussionController = this.get('controllers.discussion'); | |
console.log(discussionController); | |
this.get('discussions').forEach(function(d) { | |
console.log(d.get('comments')); | |
counter += d.get('comments.length'); | |
//var discussionController = d.get('controllers.discussion'); | |
//console.log(discussionController); | |
//discussionController.commentCount(); |
OlderNewer