Skip to content

Instantly share code, notes, and snippets.

View PhilT's full-sized avatar

Phil A Thompson PhilT

  • Electric Visions Ltd
  • Somerset, United Kingdom
View GitHub Profile
@CoditCompany
CoditCompany / fsharp-rx-marble-filter.fs
Last active February 18, 2020 16:35
F# reactive marble testing of the filter operator
[<Fact>]
let ``filter emit only those items from an observable that pass a predicate test`` () =
TestSchedule.usage <| fun sch ->
let stub = cold "--2-(30)--(22)-5--(60)-1--|" sch
let expected = "-- -(30)--(22)- --(60)- --|"
stub |> Observable.filter (fun x -> int x > 10)
|> Marbles.expectMessages sch expected
@ajdruff
ajdruff / fix-git-line-endings
Last active February 29, 2024 13:02
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF
@IanVaughan
IanVaughan / do-end.sublime-snippet
Created June 1, 2013 10:22
Packages/Ruby/do-end.sublime-snippet
<snippet>
<content><![CDATA[
do
${1:}
end
]]></content>
<tabTrigger>doe</tabTrigger>
<scope>source.ruby</scope>
<description>Insert do … end</description>
</snippet>
@steveclarke
steveclarke / capybara.md
Created April 10, 2012 17:32
RSpec Matchers

Capybara

save_and_open_page

Matchers

have_button(locator)