This file contains 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 | |
*/ |
This file contains 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 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" : "[email protected]" | |
}, |
This file contains 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 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 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
<div id="app"> | |
<v-app> | |
<v-navigation-drawer | |
persistent | |
:mini-variant="miniVariant" | |
:clipped="clipped" | |
v-model="drawer" | |
> | |
<v-list> | |
<v-list-item |
This file contains 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
mpv --input-test --force-window --idle | |
mpv --input-keylist | |
mpv --list-options | |
Keyboard | |
r and t | |
Move subtitles up/down |
This file contains 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
# | |
# Example mpv configuration file | |
# | |
# Warning: | |
# | |
# The commented example options usually do _not_ set the default values. Call | |
# mpv with --list-options to see the default values for most options. There is | |
# no builtin or example mpv.conf with all the defaults. | |
# | |
# |
This file contains 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
# mpv keybindings | |
# | |
# Location of user-defined bindings: ~/.config/mpv/input.conf | |
# | |
# Lines starting with # are comments. Use SHARP to assign the # key. | |
# Copy this file and uncomment and edit the bindings you want to change. | |
# | |
# List of commands and further details: DOCS/man/input.rst | |
# List of special keys: --input-keylist | |
# Keybindings testing mode: mpv --input-test --force-window --idle |
This file contains 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/bash | |
if [ `expr index "$1" "\+"` = 0 ]; then | |
PATTERN="*$1*" | |
else | |
#PATTERN="$1" | |
PATTERN="${1/+/*}" | |
fi | |
if [ -n "$2" ]; then |
NewerOlder