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
| RPROMPT="%{$fg[white]%}[%*]%{$reset_color%}" | |
| # Reset the prompt before accepting the line. | |
| # https://stackoverflow.com/a/35051172 | |
| function _reset-prompt-and-accept-line { | |
| zle reset-prompt | |
| zle .accept-line # Note the . meaning the built-in accept-line. | |
| } | |
| zle -N accept-line _reset-prompt-and-accept-line |
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
| [alias] | |
| # Undoes last commit and leaves the files commited by it in the staging area. | |
| undo-commit = reset --soft HEAD^ | |
| today = !git log --since=midnight --author=\"$(git config user.name)\" --color --graph --pretty=format:'%Cred%h%Creset - %s %Cgreen(%cr)%Creset' --abbrev-commit | |
| yesterday = !git log --since="yesterday.midnight" --until=midnight --author=\"$(git config user.name)\" --color --graph --pretty=format:'%Cred%h%Creset - %s %Cgreen(%cr)%Creset' --abbrev-commit | |
| # More succint version of `git status`. | |
| st = status -sb | |
| # It takes ages to type `rebase --continue`. | |
| rc = rebase --continue | |
| # My preffered version of `git log`. |
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
| // @flow | |
| import ReactDOM from 'react-dom' | |
| var Foo = require('./foo.js') | |
| // Foo is missing the `bar` prop here. | |
| // | |
| // When you open this file in vim-ale v1.2.0, it'll highlight the wrong line, | |
| // since it takes the loc information of the first message | |
| // under errors[0].message[0], which in this case points to `foo.js`, | |
| // which is not the file opened in the current buffer. |
Here is how I ended up making this work. For more context and background on the discussion, I recommend reading conversation in ReduxForm#2169 (and chiming in with your learnings, etc).
So, as per the conversation there, I tried the 'many little forms' approach. I am sharing both my approach, and a crude abstracted out gist that can hopefully help out y'all.
Essentially, with this approach:
- You want to use each field as a little form which submits debounced
onChange. - For each field as a little form, you want to abstract that into a component which can be provided an input, as much as possible.
- Set
autofocusfor the first form. - For debounced
onChange, I usedreact-debounced-input.
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
| // @flow | |
| // https://flowtype.org/try/#0PTAEAEDMBsHsHcBQiCmAPADrATgF1LgJ4YqgBKKAtrLigCICGuDAPAKLbY4AqxKANKABqDaAFcUvEgD5QAXkShQAH1ABvUAGdmtAFygA5ADsaAQU0BrFABMDoAL6KV6rTpT6DcBtYCWRgOZ2jkqqGtpM7oaQDD7i2CgGgiicOPocXNhSpMHOYW4emmIAxkUompqJoABuohL6IuKSfA4A3MjoWHigkGJGRbg+sEagJrjmVtbsKZl8gg0SWdIAFACU+hTUtIzMUxlZc7VNMupO8bhi2MN5ER6j4zZBbY6omDj4PX0DQ6BevgG7PFmwkOi1W6yoNHoTFY6UBJAOjUWJyUZwuV1cN0Mvz8gVaiGeHTe3V6-UGw2isQuKABM3hwMRfGWyQyaWmWTW5AhW2hNP29IWjORoFRlxc4T0URicQSSWmeIJry6H1J30KJTKml5QPmRxQyxqjXqIL4HI2kO2MLZ2uNxzUpxQ51F1wlBjVpXKlQNEnlyGgDu6sFg4M2UJ22mwOME4ZxsjkWmK7s0SwMDHg8FAhBQDAAFgYVm1IIH5N0pVTk7BsyNA3mC0W49iAqta7Bi3dLDYm0A | |
| export type RemoteData<ErrorType, ValueType> = | |
| | { state: 'notAsked' } | |
| | { state: 'loading' } | |
| | { state: 'failure', error: ErrorType } | |
| | { state: 'success', value: ValueType }; | |
| export function notAsked<ErrorType, ValueType>(): RemoteData<ErrorType, ValueType> { |
- J.B. Rainsberger - "Integrated tests are a Scam"
- Rich Hickey - "Simple made Easy"
- Gary Bernhardt - "Boundaries"
- Derek Prior - "Implementing strong code-review culture"
- Sandi Metz - "Nothing is Something"
- Bret Victor - "Inventing on Principle"
- Jenna Zeigen - "On How Your Brain is Conspiring Against You Making Good Software"
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
| import Html exposing (..) | |
| import Html.Attributes exposing (..) | |
| import Json.Encode | |
| valueAttributes = | |
| [ value "" | |
| , property "value" (Json.Encode.string "") | |
| , attribute "value" "" | |
| ] |
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
| $ ghci | |
| GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help | |
| Prelude> :t foldl | |
| foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b | |
| $ elm repl | |
| ---- elm-repl 0.17.1 ----------------------------------------------------------- | |
| :help for help, :exit to exit, more at <https://github.com/elm-lang/elm-repl> | |
| -------------------------------------------------------------------------------- | |
| > List.foldl |
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
| # ruby reproduction.rb | |
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do |