Skip to content

Instantly share code, notes, and snippets.

View i0n's full-sized avatar
👾

Ian Alexander Wood i0n

👾
View GitHub Profile

Keybase proof

I hereby claim:

  • I am i0n on github.
  • I am i0n (https://keybase.io/i0n) on keybase.
  • I have a public key ASB1O5mX2FW725BNFDn-CYoKQwMgqgmWbKpmoAjNrTDxYQo

To claim this, I am signing this object:

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();
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
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;
brew doctor 11:00
Your OS X is ripe for brewing.
Any troubles you may be experiencing are likely purely psychosomatic.
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
@i0n
i0n / mongoid error in rails 3 form
Created October 31, 2010 07:05
undefined method `id_criteria' for Array when submitting Rails 3 form containing more than one instance of a relationally associated mongoid document
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
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'),
<!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>
daemon off;
worker_processes 2;
events {
worker_connections 8192;
}
http {
include mime.types;
default_type application/octet-stream;