Skip to content

Instantly share code, notes, and snippets.

View phil's full-sized avatar
😄

Phil Balchin phil

😄
View GitHub Profile
@phil
phil / adams-heroku-values.md
Created November 3, 2019 15:02 — forked from adamwiggins/adams-heroku-values.md
My Heroku values

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

Keybase proof

I hereby claim:

  • I am phil on github.
  • I am maniacalrobot (https://keybase.io/maniacalrobot) on keybase.
  • I have a public key whose fingerprint is 8FDE 87D1 DF06 27EF 9DD8 326A 8C8D 50D6 DCF5 3C78

To claim this, I am signing this object:

@phil
phil / grid.html
Created April 5, 2016 19:30
Simple Grid renderer in Javascript and Canvas
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Grids!</title>
<style type="text/css">
body {
background-color:black;
margin:0px;
overflow : hidden;
@phil
phil / galaxy.html
Created April 5, 2016 19:19
Simple procedural Galaxy Renderer using Javascript and Canvas
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Grids!</title>
<style type="text/css">
body {
background-color:black;
margin:0px;
overflow : hidden;
class Nyx < RTanque::Bot::Brain
NAME = 'nyx'
include RTanque::Bot::BrainHelper
attr_accessor :target, :previous_target, :projected_target_heading, :runaway_heading
attr_accessor :runaway_direction_modifier
attr_accessor :a, :b, :c, :d
attr_accessor :toggle_runaway_direction_timeout
@phil
phil / 3_echo_server.rb
Created June 11, 2014 13:15
Very Basic EM Echo Server
require 'rubygems'
require 'eventmachine'
class EchoServer < EM::Connection
def post_init
puts "-- someone connected to the echo server!"
EM.add_periodic_timer 5 do
send_data "Foo Bar"
end
@phil
phil / 2_em_hackernews_scraping.rb
Created June 11, 2014 13:13
EventMachine scraping Hackernews
require "eventmachine"
require "em-http-request"
require 'nokogiri'
EventMachine.run do
http_hackernews = EM::HttpRequest.new("https://news.ycombinator.com").get
http_hackernews.callback do
@phil
phil / 2_hackernews_scaping.rb
Created June 11, 2014 13:12
Ruby Core Library Scraping Hackernews
require "eventmachine"
require "em-http-request"
EventMachine.run do
sites = ["http://kyan.com"] * 20
sites.each_with_index do |site,i|
http = EM::HttpRequest.new(site).get
http.callback do
@phil
phil / 1_em_http_response.rb
Created June 11, 2014 13:10
EventMachine HTTP Response
require "eventmachine"
require "em-http-request"
EventMachine.run do
sites = ["http://kyan.com"] * 20
sites.each_with_index do |site,i|
http = EM::HttpRequest.new(site).get
http.callback do
@phil
phil / 1_http_response.rb
Created June 11, 2014 12:46
Ruby Core Library HTTP Response example
require 'net/http'
(1..20).each do |i|
response = Net::HTTP.get_response(URI("http://kyan.com"))
puts "#{i}: #{response.code}"
end