Skip to content

Instantly share code, notes, and snippets.

View shuuji3's full-sized avatar
🌈
🌎 🌟 🦚 🌌 ✨

TAKAHASHI Shuuji shuuji3

🌈
🌎 🌟 🦚 🌌 ✨
View GitHub Profile
@shuuji3
shuuji3 / vitejs-docs-ja-start-new-pr.fish
Last active July 23, 2024 05:17
fish shell script for contributing Vite documentation Japanese translation https://github.com/vitejs/docs-ja
#!/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
@shuuji3
shuuji3 / bronze-1F308.png
Last active March 27, 2023 00:41
Adopted Emoji ✨
bronze-1F308.png
@shuuji3
shuuji3 / find_key_diff.py
Last active February 17, 2023 09:08
Print out the differences of JSON keys to detect the Elk's localization update.
# 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:
@shuuji3
shuuji3 / introduction-to-geopandas.ipynb
Last active August 26, 2022 14:39
introduction-to-geopandas.ipynb
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.
@shuuji3
shuuji3 / 2022-08-11-chiba-prefecture-covid-19-cases-by-city.ipynb
Created August 15, 2022 10:06
2022-08-11 chiba prefecture covid-19 cases by city.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shuuji3
shuuji3 / code.gs
Created February 4, 2022 01:18
Google Books API を使って書籍情報の JSON を取得するスクリプト
/**
* 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
@shuuji3
shuuji3 / output.jsonl
Last active November 3, 2021 08:16
Temporary solution for `mas list --json`. ref. Add option for retrieving information in JSON format · Issue #190 · mas-cli/mas - https://github.com/mas-cli/mas/issues/190
{"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)"}
@shuuji3
shuuji3 / montage-go-mochi.py
Created September 15, 2021 03:32
Run `montage` commands to create go-mochi 4 bits counters.
# 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)):
@shuuji3
shuuji3 / copy-emoji-names.js
Last active January 2, 2022 09:03
Copy emoji names added by "Neutral Face Emoji Tools".
# Run on the page: https://<your-sub-domain>.slack.com/admin/emoji
[...document.querySelectorAll('.uploads > .upload.success > .filename')].map(e => `:${e.textContent.split('.').slice(0, -1).join()}:`).join(' ')
// => ':mochi-4: :mochi-spin-fast:'