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
| #!/bin/sh | |
| IFS=$'\n' # Allow spaces and other white spaces. | |
| stty -icanon # Disable canonical mode. | |
| stty eof ^D | |
| python3 ~/bin/qs.py | |
| stty icanon # Re-enable canonical mode (assuming it was enabled to begin with). |
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
| %YAML 1.2 | |
| --- | |
| # See http://www.sublimetext.com/docs/3/syntax.html | |
| # See http://www.sublimetext.com/docs/3/scope_naming.html | |
| # | |
| # Note that blackslashes don't need to be escaped within single quoted strings | |
| # in YAML. When using single quoted strings, only single quotes need to be | |
| # escaped: this is done by using two single quotes next to each other. | |
| # | |
| # Scope discovery - Ctrl Shft Alt p |
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
| { | |
| "swagger" : "2.0", | |
| "info" : { | |
| "description" : "This is a sample Petstore server. You can find \nout more about Swagger at \n[http://swagger.io](http://swagger.io) or on \n[irc.freenode.net, #swagger](http://swagger.io/irc/).\n", | |
| "version" : "1.0.0", | |
| "title" : "Swagger Petstore", | |
| "termsOfService" : "http://swagger.io/terms/", | |
| "contact" : { | |
| "email" : "apiteam@swagger.io" | |
| }, |
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
| // If you run this in Deno: | |
| priceCandles (prices: PriceBars) { | |
| // Function scope finals | |
| const bars = prices.PriceBars | |
| const lows = bars.map(bar => bar.Low) | |
| const highs = bars.map(bar => bar.High) | |
| const high = Math.max(...highs) | |
| const low = Math.min(...lows) | |
| const diff = high - low |
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
| ;(async () => { | |
| /** | |
| * Save the content of the current page to a file. | |
| * | |
| * (Currently only works in Chrome) | |
| * | |
| * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/showSaveFilePicker | |
| * @param {string} name | |
| * @param {string} content | |
| */ |
OlderNewer