My favourite talks from RubyConf 16, and a one liner on each.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git | |
| docker | |
| docker-compose | |
| asdf + java, ruby, node, elm, elixir | |
| mono | |
| java (gradle) | |
| docker-sync | |
| vim | |
| janus-plugins | |
| jetbrains intellij |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Schema looks like: | |
| configure do | |
| def iso8601?(input) | |
| !(!Date.iso8601(input)) | |
| rescue ArgumentError | |
| false | |
| end | |
| end | |
| required(:position).filled(:int?) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| make_user role name password = | |
| <some code that actually makes user> | |
| make_admin = make_user “admin” | |
| make_admin “adz” “pa$$word” |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) |