Check the alpine version of the previous image.
alpine3.9 master$ docker run -it ruby:2.5.4-alpine sh
/ # cat /etc/alpine-release
3.9.2
/ # ruby -v
ruby 2.5.4p155 (2019-03-13 revision 67245) [x86_64-linux-musl]
| # I have not deeply researched the best way of doing this. This is just one way. | |
| # Made this gist because there was no google result for this exact question so I had to dive into the code instead. | |
| # Saving | |
| cookies = browser.driver.cookies.instance_variable_get(:@browser).get_raw_cookies.map { |c| c.instance_variable_get(:@attributes) } | |
| cookies_json = cookies.to_json | |
| # Restoring | |
| cookies = JSON.parse(cookies_json) | |
| cookies.each do |c| |
| # Atom -> Init Script... | |
| child = require "child_process" | |
| runTestInTmux = (focus) -> | |
| editor = atom.workspace.getActiveTextEditor() | |
| editor.save() | |
| fullPath = editor.getPath() | |
| projectPath = atom.project.getDirectories()[0].getPath() + "/" |
| // Didn't find anything on google for this so I wrote my own. Use as a starting point if you have a similar problem. | |
| // Please write comments if there is a better way to do this (or solve the same problem in another way) in webpack. | |
| // Contents of config/webpack/environment.js: | |
| const { environment } = require('@rails/webpacker') | |
| // Generate undigested assets for use in embedded javascript, emails, etc. | |
| // We previously used non-stupid-digest-assets for this. |
Some notes on my Elm development environment.
The most important thing is elm-format. It auto-formats the code when you save. You will likely miss this in other languages.
brew install elm elm-formatelm-format language-elmex-mode vim-mode-plusCurrently evaluating the elmjutsu plugin.
| /* jshint asi:true */ | |
| // PixiJS v4 example (WebGL rendering) | |
| model = loadStateOrDefaultTo({ | |
| move: 1 | |
| }) | |
| tick = (delta) => { | |
| if(codeHasChanged()) { return } | |
Instant-feeling unit tests improves productivity and developer happiness :)
Elixir tooling isn't quite there the way Ruby can be when optimized.
Ruby benchmarks:
Building a little list so I can more easily recommend the best talks and be able re-watch them myself.
| import UpdateList exposing (addOrUpdateById) | |
| update msg model = | |
| case msg of | |
| NewOrUpdatedItem item -> | |
| ({model | items = model.items |> addOrUpdateById item}, Cmd.none) |