Skip to content

Instantly share code, notes, and snippets.

View cmrichards's full-sized avatar

Chris Richards cmrichards

  • christopher-richards.net
  • Manchester, England
View GitHub Profile
require File.expand_path(File.dirname(__FILE__) + '/acceptance_helper')
feature "Projects", %q{
In order to allow a site to manage projects
As a site user
I want to..
} do
background do
@site = create_site({:name=>"Company1"}, "username")
@cmrichards
cmrichards / gist:716190
Created November 26, 2010 02:03
Strange Error
module Trans
end
class Job < ActiveRecord::Base
has_many :job_translations
has_many :default_job_translations, :through => :job_translations
end
class DefaultJobTranslation < ActiveRecord::Base
named_scope :forum, where(:group=>"forum")
=form_for :company_branch do |f|
.field
.label Company Type
.input=f.collection_select :company_type_id, CompanyType.not_expired, :id, :name
.field
.label Name
.input=f.text_field :name
.field
.label Address
.input=f.text_field :address
commit 8fd77c2d6c6793780701ee6cbd0c9bdff00efd8e
Author: Chris <>
Date: Sat Feb 18 12:32:27 2012 +0000
ok
diff --git a/public/system b/public/system
deleted file mode 120000
index bd6984c..0000000
--- a/public/system
app/
exhibits/
job/
job_poles_exhibit.rb
property/
line_poles_exhibit.rb
room/
pole_report_exhibit.rb
exhibit.rb
require "minitest_helper"
require "mocha"
describe Contexts::MoveAreaBeforeArea do
it "should add area before area" do
Area.expects(:find).with(100).returns(Area.new)
context = Contexts::MoveAreaBeforeArea.new 100, 100
@cmrichards
cmrichards / gist:2407071
Created April 17, 2012 15:54
Data Model + Context + Role
The Context + Roles :
module Contexts
# Move an area to different points on the tree.
#
# This context has multiple entry points for each deviation of moving an area around the tree.
#
# The source area can be moved in any of these 3 ways :
#
Uninstalling modules from DKMS
removing old DKMS module vboxhost version 4.1.4
------------------------------
Deleting module version: 4.1.4
completely from the DKMS tree.
------------------------------
Done.
Attempting to install using DKMS
/home/chrisr/Downloads/nginx/nginx-upload-module/ngx_http_upload_module.c: In function ‘ngx_http_upload_merge_loc_conf’:
/home/chrisr/Downloads/nginx/nginx-upload-module/ngx_http_upload_module.c:1104:31: error: ‘ngx_garbage_collector_temp_handler’ undeclared (first use in this function)
/home/chrisr/Downloads/nginx/nginx-upload-module/ngx_http_upload_module.c:1104:31: note: each undeclared identifier is reported only once for each function it appears in
/home/chrisr/Downloads/nginx/nginx-upload-module/ngx_http_upload_module.c:1104:31: warning: passing argument 1 of ‘ngx_conf_merge_path_value’ from incompatible pointer type [enabled by default]
src/core/ngx_file.h:142:7: note: expected ‘struct ngx_conf_t *’ but argument is of type ‘struct ngx_path_t *’
/home/chrisr/Downloads/nginx/nginx-upload-module/ngx_http_upload_module.c:1104:31: warning: passing argument 2 of ‘ngx_conf_merge_path_value’ from incompatible pointer type [enabled by default]
src/core/ngx_file.h:142:7: note: expected ‘struct ngx_path_t **’ but
// Just for a laugh I have built 2 more possible versions of the code.
// There is so little code that either way is probably as good as the other,
// but if there were more code then the changes would mean more.
int analogueIn = A0; //input pin for pressure pad
int digitalOut1 = 8; //output pin for motor control
int sensorIn; //variable for triggering the statement in while loop
int primer; //variable for triggering the primer switch
int primerS = A2; //input for primer switch
int digitalOut2 = 4; //output pin for trigger ready LED