Andrew Chalkley chalkers

View keybase.md

Keybase proof

I hereby claim:

  • I am chalkers on github.
  • I am chalkers (https://keybase.io/chalkers) on keybase.
  • I have a public key whose fingerprint is 2600 A73C 2253 C3BE 9C90 7094 BE17 FA88 1D1E C04D

To claim this, I am signing this object:

View gist:7818873
1 2 3 4 5 6 7 8 9 10
"intensity" : "20",
"vectors" : "1",
"worksize" : "256",
"kernel" : "scrypt",
"lookup-gap" : "2,2",
"thread-concurrency" : "24000",
"shaders" : "0,0",
"gpu-engine" : "0-1085",
"gpu-fan" : "0-100",
"gpu-memclock" : "1375",
View basic_library.ino
1 2 3 4 5 6 7 8 9 10
#include <DigitalPin.h>
 
DigitalPin forward(13);
DigitalPin backward(12);
 
void setup(){
}
 
void loop() {
backward.off();
View gist:1435273
1 2 3 4 5 6 7 8 9
//Have a UIImage *image
 
NSDictionary *detectorOptions = [[NSDictionary alloc] initWithObjectsAndKeys:CIDetectorAccuracyHigh, CIDetectorAccuracy, nil];
 
CIDetector *faceDetector = [CIDetector detectorOfType:CIDetectorTypeFace context:nil options:detectorOptions];
 
CIImage *ciImage = [CIImage imageWithCGImage:[image CGImage]];
 
NSArray *features = [faceDetector featuresInImage:ciImage];
View HTMLToMarkdown.js
1 2 3 4 5 6 7 8 9 10
function htmlToMarkdown($container) {
var $clone = $container.clone();
$("*",$clone).removeAttr("name").removeAttr("title").removeAttr("id")
var html = $clone.html();
html = standardiseHTML(html);
html = html.replace(/<a [^h]*href=["']([^"']*)["'][^>]*>([^<]*)<\/a>/gi, " [$2]($1)");
html = html.replace(/<em[^>]*>([^<]*)<\/em>/gi,"*$1*");
html = html.replace(/<strong[^>]*>([^<]*)<\/strong>/gi,"**$1**");
html = html.replace(/<i[^>]*>([^<]*)<\/i>/gi,"*$1*");
html = html.replace(/<b[^>]*>([^<]*)<\/b>/gi,"**$1**");
View instructions.txt
1 2 3 4 5 6 7 8 9 10
rails testing_deployed_app
cd testing_deployed_app
ruby script/generate cucumber --rspec --capybara
 
#In features/support/env.rb add
Capybara.current_driver = :selenium
Capybara.app_host = 'http://news.bbc.o.uk'
 
 
rake db:migrate
View validates.rb
1 2
validates_format_of :email, :with => /^[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}/i
validates_format_of :website, :with => /^http:\/\//
View udploggerthingy.rb
1 2 3 4 5 6 7 8 9 10
module Rack
class UDPLoggerThingy
def initialize app, options = { }
@app = app
end
 
def call env
status, headers, body = @app.call(env)
#Do shit here
#http://rack.rubyforge.org/doc/classes/Rack/Request.html
View feature.feature
1 2 3 4 5 6 7 8 9 10
Scenario: Ordering
And I follow "Archive"
Then I should see the following div with id archive results:
|Article Evolution and Biology Title TAGGED: BIOLOGY, EVOLUTION|
|Article Biology Only Title TAGGED: BIOLOGY |
|Article Evolution Only Title TAGGED: EVOLUTION |
When I follow "Article Biology Only Title"
And I fill in "Content" with "This comment should be long enough!"
And I press "Create Comment"
And I follow "Archive"
View tag.feature
1
And I unselect "Evolution" from "Tags"
Something went wrong with that request. Please try again.