I hereby claim:
- I am xmjw on github.
- I am xmjw (https://keybase.io/xmjw) on keybase.
- I have a public key whose fingerprint is 741F 4ABC BB34 B93E 3236 AF30 2821 AF5B D66D 5F20
To claim this, I am signing this object:
# Parses results from Ofsted Search into a clean CSV | |
# Sample data from Ofsted: | |
# <li> | |
# <h3 class="search-result__title heading--main"> | |
# <a href="/provider/16/EY546864">Little Pips</a> | |
# </h3> | |
# <address class="search-result__address">William Sutton Trust Rotherhithe Estate Office, 30 Plough Way, London, SE16 2LJ</address> | |
# <strong class="address-distance">0.19 miles</strong> | |
# <div class="search-result__provider-rating search-result__provider-rating--none"> | |
# <button class="js-toggle-info expander-see-more btn-nostyle">No report yet – Why?</button> |
class A | |
def say_my(name='') | |
puts "Called with: #{name}" | |
end | |
end | |
class B < A | |
def say_my(name) | |
super | |
end |
class MyThing | |
end | |
RSpec.shared_examples 'a thing that causes a segfault' do | |
it 'segfaults' do | |
expect(true).to eq(true) | |
end | |
end | |
RSpec.describe MyThing do |
<HTML> | |
<H1>Q</H1> | |
</HTML> |
# Need the Sinatra Library to make a web app! | |
require 'sinatra' | |
# This is the URL that can be used for the Voice URL on your Twilio Number | |
post '/messages' do | |
content_type 'text/xml' | |
"<Response> | |
<Message>This is an SMS reply.</Message> | |
</Response>" | |
end |
I hereby claim:
To claim this, I am signing this object:
require 'twilio-ruby' | |
client = Twilio::REST::Client.new "Your twilio SID", "Tour twilio Token" | |
#Send SMS... | |
client.account.messages.create(to: "+44 your number", from: "+44a twilio number", body: "the contents of your message") | |
#Make a call... | |
client.account.calls.create(to: "+44 your number", from: "+44a twilio number", url: "http://blahblah.ngrok.com/cheese") |
configure do | |
set :hue_user, ENV['HUE_USERNAME'] | |
set :hue_ip, ENV['HUE_IP'] | |
set :hue_bulb, ENV['HUE_BULB'] | |
end |
get '/build' do | |
Step.create_tree | |
"DONE" | |
end |
module Colourize | |
#We do not want to use method_missing because this is a module, not a class, and it will cause hell for everyone else. | |
#Foreground colours... | |
{ black: 30, red: 31, green: 32, yellow: 33, purple: 34, fuscia: 35, blue: 36, bold: 1, grey: 2, underline: 4, blink: 5}.each do |c,v| | |
define_method("fg_"+c.to_s) { |text| colourize_text v, text } | |
end | |
{grey: 7, red: 41, green: 42, yellow: 43, purple: 44, fuscia: 45, blue: 46, white: 47}.each do |c,v| |