Skip to content

Instantly share code, notes, and snippets.

View neilmiddleton's full-sized avatar
🏠
Working from home

Neil Middleton neilmiddleton

🏠
Working from home
View GitHub Profile
@neilmiddleton
neilmiddleton / gist:6428450
Created September 3, 2013 19:29
RTanque bot
class MyHarmlessBot < RTanque::Bot::Brain
NAME = 'Fred West'
include RTanque::Bot::BrainHelper
CORNERS = [:NW, :NE, :SE, :SW]
TURRET_FIRE_RANGE = RTanque::Heading::ONE_DEGREE * 3.0
SWITCH_CORNER_TICK_RANGE = (200..400)
def tick!
self.hide_in_corners
my_hash = {}
my_hash[:one] = 'foo'
my_hash[:two] = 'bar'
my_hash[:three] = 'baz'
my_hash.keys.each{|k| puts k}
my_hash = {}
my_hash[:three] = 'baz'
my_hash[:two] = 'bar'
require 'unicorn'
require 'json'
config = Unicorn::Configurator.new(config_file: 'config/unicorn.rb')
config_hash = {
"timeout" => config[:timeout],
"worker_processes" => config[:worker_processes],
"preload_app" => config[:preload_app],
}
[
{
"name": "test",
"dataclip": "https://dataclips.heroku.com/xxxcgvztxgjwfcatoebjqhnpohhebch",
"type": "value",
"source": "paid"
}
]
<div ng-include="'/assets/application/_header.html'"></div>
<div class="container">
<form ng-submit="submit()">
<div class="form-group">
<input class="form-control" id="latitude" max="90" min="-90" ng-model="waypoint.latitude" placeholder="Latitude" required step="any" type="number">
</div>
<div class="form-group">
<input class="form-control" id="longitude" max="180" min="-180" ng-model="waypoint.longitude" placeholder="Longitude" required step="any" type="number">
</div>

Keybase proof

I hereby claim:

  • I am neilmiddleton on github.
  • I am neilmiddleton (https://keybase.io/neilmiddleton) on keybase.
  • I have a public key whose fingerprint is BDA8 5D45 2BCB 1205 66A7 7567 1A72 C599 9F27 98C2

To claim this, I am signing this object:

My Inbox zero system

  1. Check email

  2. Does the email warrant any interest/time at all?
    No? archive it immediately (e in Gmail).

  3. Is the email just informational?
    Read it. Archive it.

  4. Does the email require something which can be done quickly (< 2 mins) right now?

$ cd ~/.ssh
$ mkdir backup
$ cp id* backup/.
$ ssh-keygen -t rsa
$ heroku keys:clear
$ heroku keys:add id_rsa.pub
@neilmiddleton
neilmiddleton / search_guide.md
Last active August 29, 2015 14:06
Searching within Morpheus

Simple search

broken

This simple search returns all tickets which contain the word "broken" across any of the ticket fields and comments.

Not so simple searches

class DodgeitAndScarper < RTanque::Bot::Brain
NAME = 'dodgeit_and_scarper'
include RTanque::Bot::BrainHelper
RUN_AND_COVER = 80
def tick!
nearest = nearest_victim
command.speed = RTanque::Bot::MAX_SPEED