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:

@i0n
i0n / Vagrantfile
Created February 2, 2015 16:38
Vagrant docker host proxy Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.require_version ">= 1.6.3"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider "virtualbox" do |v|
v.memory = 1024
end
@i0n
i0n / gist:3cd7549c08f5162af115
Created October 31, 2014 14:42
dmesg output after CoreOS crash
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.16.2+ (buildbot@ip-10-204-3-57) (gcc version 4.7.3 (Gentoo Hardened 4.7.3-r1 p1.4, pie-0.5.5) ) #2 SMP Thu Oct 16 01:11:04 UTC 2014
[ 0.000000] Command line: console=tty0 ro noswap cros_legacy console=hvc0 root=LABEL=ROOT rootflags=subvol=root usr=PARTUUID=7130c94a-213a-4e5a-8e26-6cce9662f132
[ 0.000000] ACPI in unprivileged domain disabled
[ 0.000000] 1-1 mapping on 6d400->8000000
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] Xen: [mem 0x0000000000000000-0x000000000009ffff] usable
[ 0.000000] Xen: [mem 0x00000000000a0000-0x00000000000fffff] reserved
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'),