Skip to content

Instantly share code, notes, and snippets.

View robtarr's full-sized avatar

Rob Tarr robtarr

View GitHub Profile
class Player
def initialize
@last_health = 20
end
def play_turn(warrior)
move = MoveAction.new warrior
health = HealthAction.new warrior
### Keybase proof
I hereby claim:
* I am robtarr on github.
* I am robtarr (https://keybase.io/robtarr) on keybase.
* I have a public key whose fingerprint is 964A 0CC8 1AD5 7FFB A73B 68E7 7049 CA37 8F8E 8717
To claim this, I am signing this object:
@robtarr
robtarr / geocode.gs
Created April 17, 2014 13:35
Geocoding script for Google Drive Spreadsheets
function geoCode(addr){
var gc = Maps.newGeocoder();
var geoJSON = gc.geocode(addr);
var lat = geoJSON.results[0].geometry.location.lat;
var lng = geoJSON.results[0].geometry.location.lng;
return lat + ", " + lng;
}
@robtarr
robtarr / geocode-script.js
Last active August 29, 2015 13:59
Code samples for Event Map Foundry post
function geoCode(addr){
var gc = Maps.newGeocoder();
var geoJSON = gc.geocode(addr);
var lat = geoJSON.results[0].geometry.location.lat;
var lng = geoJSON.results[0].geometry.location.lng;
return lat + ", " + lng;
}
@robtarr
robtarr / level 1
Created April 23, 2014 18:08
Ruby Warrior Levels - simple solutions
class Player
def play_turn(warrior)
warrior.walk!
end
end
@robtarr
robtarr / Wishlist
Created October 13, 2014 14:20
New Project Setup Wishlist
There are many things that we do to start projects - create a repo, setup dev/qa servers, etc. If you could automate some of this process, what would you include?
- GitHub Repo
- Slack Integration
- [CodeClimate](codeclimate.com)
- [CircleCI](circleci.com)
- Dev Server
- username/pass for us and client
- QA Server
- username/pass for us and client
test:
override:
- ./node_modules/.bin/gulp ci
@robtarr
robtarr / robot.js
Created July 25, 2015 14:38
Simple Johnny-Five demo
var five = require("johnny-five"),
keypress = require('keypress'),
board = new five.Board(),
stdin = process.stdin;
keypress(process.stdin);
stdin.setRawMode(true);
stdin.resume();
board.on("ready", function() {
@robtarr
robtarr / imp.js
Created July 25, 2015 17:32
Electric Imp Robot
var five = require('johnny-five'),
Imp = require("imp-io"),
keypress = require('keypress'),
board = new five.Board({
repl: false,
debug: false,
io: new Imp({
agent: 'FPKHeMBXeuim'
})
}),