Skip to content

Instantly share code, notes, and snippets.

@camillebaldock
camillebaldock / README.md
Last active February 18, 2021 14:27
Duolingo Dashing widget
@camillebaldock
camillebaldock / README.md
Last active December 23, 2015 01:39
Dashing widget to display a different gem from ruby-toolbox.com every minute
@camillebaldock
camillebaldock / README.md
Last active December 23, 2015 01:39
Dashing widgets to display: - a user's public photos - a user's favourite photos
@camillebaldock
camillebaldock / README.md
Last active April 17, 2020 11:05
Dashing widget to display Outlook calendar events
@camillebaldock
camillebaldock / oyster.rb
Last active February 4, 2017 13:43
Oyster journey history scraping script
require 'rubygems'
require 'capybara'
require 'capybara/dsl'
require 'capybara/poltergeist'
require 'awesome_print'
Capybara.run_server = false
Capybara.current_driver = :poltergeist
class Oyster
@camillebaldock
camillebaldock / codebar.md
Last active August 29, 2015 14:02
Codebar notes

MEDIUM-TERM QUESTIONS

  • Define a high level mission statement
  • what are we focusing on and what we do not plan on teaching?
  • why we are not doing Rails, why you should go back to basics: blog post? disclaimer? (e.g. wordpress/tools/startup-type helpers vs learning how to program from the ground up)
  • Coach inductions
  • Explicit paths/tracks through our training content
  • Development environment surgeries
  • Define roles such as course coordinator/tutorial coordinator/tutorial owner
@camillebaldock
camillebaldock / smartdown_coversheet.rb
Last active August 29, 2015 14:04
Smartdown to Smart-Answer-Friendly models
class SmartdownCoversheet
def initialize(node)
@node = node
end
def title
node.elements.find{|element| element.is_a? Smartdown::Model::Element::MarkdownHeading}
end
#TODO: this will ignore any headings in the body; if I include headings, then "Next node" appears in the text
@camillebaldock
camillebaldock / employee.rb
Last active August 29, 2015 14:05
Jack: Employee Salary Calculator exercise
class Employee
attr_reader :name, :month_salary
def initialize(args)
@name = args[:name]
@month_salary = args[:month_salary]
end
def vat
0.20
end
@camillebaldock
camillebaldock / tech_debt.md
Last active August 29, 2015 14:09
Smartdown Tech Debt

Smartdown/smart-answers tech-debt and potential improvements

Testing and confidence

  • Enforce unique flow name between Smartdown/SA
  • Smartdown lint/validate
    • Check all ref'd nodes exist
    • Check no orphan nodes
    • Run in SA CI
  • Smartdown Scenarios
  • Feature flag to disable artefact lookup
@camillebaldock
camillebaldock / date-notes.md
Last active August 29, 2015 14:13
⌛ It will never be 2014 again 💔 (or 2013 for that matter)

##Workplace pension calculator

def threshold_annual_rate
  if Date.today < Date.civil(2013, 4, 8)
    8105.0
  elsif Date.today >= Date.civil(2013, 4, 8)
    9440.0
  end
end