Skip to content

Instantly share code, notes, and snippets.

View charlottebrf's full-sized avatar

Charlotte Fereday charlottebrf

View GitHub Profile

Keybase proof

I hereby claim:

  • I am charlottebrf on github.
  • I am charlotte_brf (https://keybase.io/charlotte_brf) on keybase.
  • I have a public key whose fingerprint is 710D 271D BE1F D3C6 42F9 7CF2 315F 9592 B56A F822

To claim this, I am signing this object:

@charlottebrf
charlottebrf / 00_destructuring.md
Created June 3, 2018 15:50 — forked from john2x/00_destructuring.md
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors

@charlottebrf
charlottebrf / third-js-string-calculator
Created August 21, 2017 16:42
Throwing errors with ES6 using Mocha & Chai: where am I going wrong?
Full project can be found here: https://github.com/charlottebrf/third-js-string-calculator
Tests:
it("raises an error for a negative number", () => {
expect.throws(calculator.add("-1;2"), Error, "Error: negatives not allowed: -1")
})
it("raises an for multiple negative numbers", () => {
expect.throws(calculator.add("3, -1, -2, 4"), Error, "Error: negatives not allowed: -1, -2")
})
@charlottebrf
charlottebrf / third-js-string-calculator
Created August 21, 2017 16:42
Throwing errors with ES6 using Mocha & Chai: where am I going wrong?
Full project can be found here: https://github.com/charlottebrf/third-js-string-calculator
Tests:
it("raises an error for a negative number", () => {
expect.throws(calculator.add("-1;2"), Error, "Error: negatives not allowed: -1")
})
it("raises an for multiple negative numbers", () => {
expect.throws(calculator.add("3, -1, -2, 4"), Error, "Error: negatives not allowed: -1, -2")
})
********1 Account class: am I using state/ class injection in a better way here than V1?********
class Account
attr_reader :balance, :statement
def initialize
@balance = 0
@statement = Statement.new
end
@charlottebrf
charlottebrf / CF_Instagram
Created July 4, 2017 07:22
Extracts from Instagram weekend challenge
**************PICTURES CONTROLLER:**************
class PicturesController < ApplicationController
before_action :require_login
def index
@pictures = Picture.all
end