Skip to content

Instantly share code, notes, and snippets.

View adz's full-sized avatar

Adam Davies adz

  • Veridapt
  • Adelaide, Australia
  • 14:47 (UTC +09:30)
  • X @adzdavies28
View GitHub Profile
// Simulate sync action, that returns count of records synced
let syncRecords upToTimestamp : ResultT<Async<Result<int,string>>> = ResultT <| async.Return (Ok 3)
let recordTimestampUsingFSData body : Async<FSharp.Data.HttpResponse> =
FSharp.Data.Http.AsyncRequest
( "https://myapi.example.com/sync"
, httpMethod = "POST"
, body = TextRequest (sprintf "%A" body) // actually is json
, silentHttpErrors = true )
git
docker
docker-compose
asdf + java, ruby, node, elm, elixir
mono
java (gradle)
docker-sync
vim
janus-plugins
jetbrains intellij
@adz
adz / dryhints.rb
Last active January 24, 2017 03:55
# Schema looks like:
configure do
def iso8601?(input)
!(!Date.iso8601(input))
rescue ArgumentError
false
end
end
required(:position).filled(:int?)
@adz
adz / 0_reuse_code.js
Created September 19, 2016 02:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Newsletter
Join the Adelaide.rb here!!! https://adelaide-rb-join.herokuapp.com/Jobs
Rails Camp Adelaide tickets here!!! https://ti.to/ruby-australia/rails-camp-adelaide-2016/en
JOBS!
The following companies are looking for developers.
@adz
adz / Favourite RubyConf16 Talks.md
Last active February 14, 2016 22:58
Favourite RubyConf16 Talks
command_builder = rom.command # no relation given, so get builder
nested_command = command_builder.create(user: :users) do |user|
user.create(:books)
end
# equivalent:
nested_command = rom.command({user: :users}, [:create, [:books, [:create]]])
# equivalent
General discussion...
Chris:
meetups allows annnouncements to twitter/FB
need to setup?
Lauren:
-> More general social event? ED/Lauren working on over new years
Lauren:
make_user role name password =
<some code that actually makes user>
make_admin = make_user “admin”
make_admin “adz” “pa$$word”
def make_user(role, name, password)
<some code that actually makes user>
end
class UserMaker
def initialize(role)
@role = role
end
def make(name, password)