Skip to content

Instantly share code, notes, and snippets.

View mikekelly's full-sized avatar

Mike Kelly mikekelly

View GitHub Profile

I believe that if we are honest with ourselves, that the most fascinating problem in the world is “who am I?” What do you mean? What do you feel when you say the word “I, myself”? I don’t think there can be anymore fascinating preoccupation than that because it is so mysterious. It is so elusive. Because what you are in your inmost being escapes your examination in rather the same way you cant look into your own eyes without a mirror, you can’t bite your own teeth, you can’t taste your own tongue and you can’t touch the end of one finger with the same finger. That is why there is always an element of profound mystery in the problem of who we are."

-- Alan Watts

{
"_links":{
"self":{
"href":"/users"
}
},
"_forms":{
"create-user":{
"title":"Create a new widget",
"description":"Enter your widget info and submit to create a new widget",
@mikekelly
mikekelly / an_example.md
Last active May 9, 2016 22:30
what forms could look like in halo
@mikekelly
mikekelly / hactor_example.rb
Created November 26, 2012 22:44
Hactor example
require 'hactor'
class HomeActor
include Hactor::Actor
def on_200(response)
response.follow 'ht:users', actor: UserListActor.new
end
end
{
"_links": {
"self": {
"href": "/product/987"
},
"manufacturer": {
"href": "/manufacturer/328764",
"title": "Manufacturer Inc."
}
},
{
"_links": {
"self": { "href": "/foo" },
},
"_controls": {
"attack": {
"target": "/attacks",
"method": "POST",
"headers": {
"Content-Type": "application/json"
@mikekelly
mikekelly / rspec_stub_chain_if_spec.rb
Created September 27, 2012 10:50 — forked from deepak/rspec_stub_chain_if_spec.rb
mocking stub chains with an assertion if the final call is made
require 'rspec'
class DevOps
attr_reader :monitor
def initialize(arguments)
@monitor = arguments.fetch(:monitor) { Monitor.new }
end
def check
require_relative 'deferrable'
require_relative 'slime'
class WidgetsController
include ControllerSlime
def create
creator = WidgetCreator.new(attributes: params[:widget])
creator.done do |widget|
<!doctype html>
<head>
<title>An example tweet</title>
</head>
<body xmlns:ht="http://haltalk.herokuapp.com/rels/">
<form class="properties" action="" method="POST">
<input type="hidden" name="_method" value="PUT" />
<input name="content" value="Justin Bieber is grate!111" />
<input name="created_at" value="2012-07-07T22:35:33+00:00" />
<button>Update</button>