Skip to content

Instantly share code, notes, and snippets.

.hugo-blog-card {
display: flex;
border: 1px solid #e2e8f0;
border-radius: 8px;
overflow: hidden;
text-decoration: none;
color: inherit;
/* Added a 1rem margin to the left and right so it doesn't touch the edges */
margin: 1.5rem 1rem;
transition: transform 0.2s, box-shadow 0.2s;
import sys
import requests
from bs4 import BeautifulSoup
import json
import os
from datetime import datetime
# Install this script in a directory like ~/hugo_root/tools/
# Configure your project paths
{{/* Get the parameters */}}
{{ $id := .Get "id" }}
{{ $providedUrl := .Get "url" }}
{{/* Look up the ID in data/blogcards.json */}}
{{ $cardData := index site.Data.blogcards $id }}
{{ if $cardData }}
{{ $finalImage := "" }}
@mehori
mehori / 00get.jra3q.currect.sh
Created March 18, 2026 05:51
RDA d640001 から JRA-3Q の最新データをダウンロードするスクリプト
#!/bin/bash
function get_file(){
local yr=$1
local mon=$2
local day1=$3
local day2=$4
local vtype=$5
local var=$6
@mehori
mehori / 00get.jra3q.sh
Created March 18, 2026 05:45
RDA d640000 から JRA-3Q を wget でダウンロードするスクリプト
#!/bin/bash
function get_file(){
local yr=$1
local mon=$2
local day1=$3
local day2=$4
## analysis / variable type
local vtype=$5
@mehori
mehori / update_frontmatter.py
Last active January 2, 2025 02:00
csv ファイルで与えた「パス、カテゴリ、タグ(複数)」で frontmatter を書き換えて出力する python スクリプト
import csv
import frontmatter
import shutil
import sys
def update_frontmatter(csv_file):
with open(csv_file, 'r') as file:
reader = csv.reader(file)
for row in reader:
try:
@mehori
mehori / attention-international-users.md
Last active September 20, 2024 13:11
VRChatのワールドに「日本の初心者ユーザー向け」と表示したい場合の英語例

VRChatのワールドに「日本の初心者ユーザー向け」と表示したい場合に "Attention" 「注目 / 注意」という表題のもとにこうしたメッセージを出しておくと効果があるかもしれません。

Attention

This world is intended for beginner users in Japan to learn VRChat and make friends talking in Japanese. To all international users, we kindly ask you to give space to such users and refrain from talking in English or any other language besides Japanese so that they can get used to VRChat in the comfort of their language. Your understanding is greatly appreciated.

翻訳(Translation):

このワールドは日本の初心者ユーザーが日本語でVRChatについて学び、友達を見つけるために作られています。その他の国のみなさんは、英語など日本語以外の言葉で話しかけないようにして、そうした初心者ユーザーが母国語で安心して慣れることができるようにしてあげてください。ご協力に感謝します。

{
"editor.tokenColorCustomizations": {
"textMateRules": [
// 太字
{ "scope": "markup.bold.markdown", "settings": { "foreground": "#222222", "fontStyle": "bold" } },
{ "scope": "punctuation.definition.bold.markdown", "settings": { "foreground": "#222222", "fontStyle": "bold" } },
// 見出し部分
// ”# 見出し" の # 部分の色
{ "scope": "punctuation.definition.heading.markdown", "settings": { "foreground": "#4599C4", "fontStyle": "bold" } },
@mehori
mehori / read_ruinenchi.py
Created April 5, 2024 13:40
生物季節観測累年値ファイル(CSV) をパースする Python スクリプト
# 生物季節観測累年値ファイル(CSV) をパースして、「年 1月1日からの日数」に変換する
# https://www.data.jma.go.jp/sakura/data/download_ruinenchi.html
# replace には全角スペースを入れておくようにする
import codecs
def readData(file, station):
with codecs.open(file, "r", encoding="shift_jis") as ifile:
for line in ifile:
line = line.strip()
line = line.replace(" ", "")
'reinit'
'set display color white'
'c'
'sdfopen composite_z500.nc'
'set mproj scaled'
'set mpdraw off'
* 仮想ページを作成、8.5x11in のキャンバスに、この範囲を仮想的にページをする
* 複数の図を掲載する場合は、一つ一つをvpageにして並べる
'set vpage 0.0 7.0 0.0 7.0'