Skip to content

Instantly share code, notes, and snippets.

# `sheldon` configuration file
# ----------------------------
#
# You can modify this file directly or you can use one of the following
# `sheldon` commands which are provided to assist in editing the config file:
#
# - `sheldon add` to add a new plugin to the config file
# - `sheldon edit` to open up the config file in the default editor
# - `sheldon remove` to remove a plugin from the config file
#
# Generated by Powerlevel10k configuration wizard on 2026-04-26 at 21:18 JST.
# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 4117.
# Wizard options: nerdfont-v3 + powerline, small icons, rainbow, unicode, 24h time,
# round separators, round heads, round tails, 2 lines, solid, no frame,
# darkest-ornaments, sparse, many icons, concise, transient_prompt,
# instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with powerline prompt style with colorful background.
# Type `p10k configure` to generate your own config based on it.
# Ghostty
# テーマ
theme = dark:TokyoNight Moon,light:TokyoNight Day
# フォント
font-family = HackGen35 Console NF
font-size = 14
font-style = Regular
@stbtkhr
stbtkhr / auto-remove-for-1-week.sh
Last active November 1, 2023 07:28
nasで1週間以上のファイルを消す
#!/bin/bash
# 使用方法は、 . auto-remove-for-1-week.sh /volume1/scan です。
folders=("/volume1/scan" "/volume1/hogehoge")
if [ -z "$1" ]; then
echo "引数がありません"
exit 1
elif [[ ! " ${folders[@]} " =~ " $1 " ]]; then
echo "対象のフォルダーではありません"
@stbtkhr
stbtkhr / test.py
Created August 24, 2023 11:52
tesrt
# torico-blog
# user.factory.py
class UserFactory:
pass
# torico-shop
# factory.py
from user.factory import UserFactory
@stbtkhr
stbtkhr / merge_dict.py
Last active August 2, 2023 01:57
なんかdictをまとめてみた。
def merge_dict(parent, d):
_parent = dict(parent)
uniq_list = lambda l: list(set(l))
for k, v in data.items():
if not (parent_value := parent.get(k)):
_parent[k] = v
elif isinstance(parent_value, dict):
_parent[k] = merge_dict(parent_value, v)
elif isinstance(parent_value, list):
_parent[k] = uniq_list(parent_value + v) if isinstance(
@stbtkhr
stbtkhr / version_alert.jsx
Last active July 16, 2023 09:40
Check the version of illustrator.
var version_map = {
"11.0":"CS",
"12.0":"CS2",
"13.0":"CS3",
"14.0":"CS4",
"15.0":"CS5",
"16.0":"CS6",
"17.0":"CC legacy",
"24.0":"CC 2020",
}
def adder(n: int):
def _adder(nn: int):
_n = n
print(n + nn)
return _adder
if __name__ == '__main__':
a = adder(10)
a(3)
a(8)
@stbtkhr
stbtkhr / fizzbuzz.py
Last active April 28, 2023 09:13
fizzbuzz
def fizzbuzz(n: int):
p = ''
if not n % 3:
p += 'Fizz'
if not n % 5:
p += 'Buzz'
return p if p else n
if __name__ == '__main__':
@stbtkhr
stbtkhr / howLongToReachFundGoal.py
Last active April 23, 2023 05:43
howLongToReachFundGoal
def howLongToReachFundGoal(capitalMoney, goalMoney, interest):
def _howLongToReachFundGoal(_c, _g, _i, _y):
if _c >= _g:
return 0
if _y > 80:
return 0
_y += 1
return 1 + _howLongToReachFundGoal(
(_c * ((100 + _i) / 100)) // 1,
(_g * (100 + (3 if _y % 2 else 2)) / 100) // 1,