๐
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
| // usage: | |
| // 1. open "Watch later" page: https://www.youtube.com/playlist?list=WL | |
| // 2. scroll down to the bottom of the queue | |
| // 3. run this in the console | |
| function toSec(str) { | |
| let [h, m, s] = str.split(':').map((head, _) => parseInt(head)) | |
| if (!s) { | |
| s = m | |
| m = h | |
| h = 0 |
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
| #!/usr/bin/env fish | |
| # Parse args | |
| if count $argv > /dev/null | |
| set issue $argv[1] | |
| else | |
| read -p 'set_color green; echo -n "Issue number"; set_color normal; echo "> "' issue | |
| end | |
| # Create a new branch |
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
| # Print out the differences of JSON keys to detect the Elk's localization update. | |
| import json | |
| def recursive_items(dictionary, prefix=''): | |
| for key, value in dictionary.items(): | |
| if type(value) is dict: | |
| yield (f'{prefix}{key}', value) | |
| yield from recursive_items(value, prefix=f'{key}.') | |
| else: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| /** | |
| * Google Books API ใไฝฟใฃใฆๆธ็ฑๆ ๅ ฑใฎ JSON ใๅๅพใใใ | |
| * | |
| * @param {string} isbn - ๆธ็ฑใฎ ISBN | |
| * @return {object} | |
| * | |
| * @see Using the API | Google Books APIs | Google Developers | |
| * - https://developers.google.com/books/docs/v1/using#PerformingSearch | |
| * @see Error: "Cannot determine user location for geographically restricted operation." | |
| * - Google ใใญใใฏใ ใใฉใผใฉใ - https://productforums.google.com/forum/#!msg/books-api/cK8VJUhRl9w/rx-8HPDy8FIJ |
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
| {"id": 497799835, "name": "Xcode (13.1)"} | |
| {"id": 1423210932, "name": "Flow (2.7.5)"} | |
| {"id": 1452453066, "name": "Hidden Bar (1.8)"} | |
| {"id": 1475387142, "name": "Tailscale (1.16.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
| # Run `montage` commands to create go-mochi 4 bits counters. | |
| import subprocess | |
| import itertools | |
| mochi_bit = ['mochi-dark2.png', 'mochi.png'] | |
| bits_list = itertools.product((0, 1), (0, 1), (0, 1), (0, 1)) | |
| # => [(0, 0, 0, 0), (0, 0, 0, 1), ...] | |
| for bits, n in zip(bits_list, range(16)): |
NewerOlder