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
| https://stackoverflow.com/a/63023383/3422861 | |
| docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} %tab% {{.Name}}' $(docker ps -aq | |
| ) | sed 's#%tab%#\t#g' | sed 's#/##g' | sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4n |
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
| module Main where | |
| import Prelude | |
| import Effect (Effect) | |
| import Effect.Console (log) | |
| type Person = Age (name :: String) | |
| type Age a = |
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
| toNonZeroInteger :: Int -> Int | |
| toNonZeroInteger 0 = 1 | |
| toNonZeroInteger x = if x < 0 | |
| then (-x) + 1 | |
| else x + 1 |
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
| https://github.com/microsoft/TypeScript/issues/26262#issuecomment-431406596 |
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
| function createPromises(onFunctions) { | |
| return onFunctions.map(onFunction => { | |
| return new Promise((resolve, reject) => { | |
| try { | |
| onFunction(resolve) | |
| } catch (e) { | |
| reject(new Error(`Error in function ${onFunction.name}: ${e}`)) | |
| } | |
| }) | |
| }) |
OlderNewer