Skip to content

Instantly share code, notes, and snippets.

View RYLSnmm's full-sized avatar
🌙

RYLS RYLSnmm

🌙
View GitHub Profile
@RYLSnmm
RYLSnmm / readme.md
Last active April 30, 2024 09:24
YouTube の支払い部分の集計

説明

YouTube のスパチャ・スパステの支払いの金額集計

↓のページを開く

https://www.youtube.com/paid_memberships

支払い履歴のところが省略されてる場合は必要なところまで開く

@RYLSnmm
RYLSnmm / autoname.js
Created September 30, 2023 08:00
form の名前が未入力のときに自動でつける
export default ({
auto_names_promise,
local_names,
disable_local_name_suffix,
form_name,
storage_key,
}) => {
let auto_names = []
auto_names_promise.then(data => {
auto_names = data
@RYLSnmm
RYLSnmm / once.nim
Created May 7, 2022 12:49
同じコマンドを履歴から 2 回実行してしまわないようにするためのツール
import std/os
import std/strutils
import std/sequtils
let log_file = getHomeDir() & DirSep & "once_log.txt"
type Parsed = object
action: string
param: string
exec: seq[string]
@RYLSnmm
RYLSnmm / notify-ip.ps1
Created December 22, 2021 14:50
IP アドレスを定期的に Gist に保存する(外部から自宅 IP調べる用)
# config
$token = ""
$gistid = ""
$filename = ""
# 読み込み
function load() {
$data = irm "https://api.github.com/gists/$gistid"
return $data.files.$filename.content
}
@RYLSnmm
RYLSnmm / example.html
Created February 15, 2021 10:55
フラットな HTML を h1, h2, h3, ... の見出しで構造化する
<!DOCTYPE html>
<div id="target">
<p>aaa</p>
<h1>1</h1>
<p>bbb</p>
<p>ccc</p>
<h2>1.1</h2>
<p>dddd</p>
<h3>1.1.1</h3>
@RYLSnmm
RYLSnmm / cite-img-sep.js
Created February 15, 2021 10:53
参照URL付き画像表示のWebComponent
class CommonHTMLElement extends HTMLElement {
constructor() {
super()
this.attachShadow({ mode: "open" })
this.defineAttributeProperties()
this.rendered = false
}
defineAttributeProperties() {
for (const [name, type] of Object.entries(this.constructor.attributeProperties)) {
@RYLSnmm
RYLSnmm / autorun.ps1
Created February 15, 2021 10:33
フォルダ共有を使ってリモートコマンド実行
$bat = $args[0]
while ($true) {
if (Test-Path $bat -PathType Leaf) {
$ts = Get-Date -Format "yyyy/MM/dd HH:mm"
"### ${ts} | ${bat}" >> "$bat.log"
& $bat 2>&1 >> "$bat.log"
mv $bat "$bat.done"
}
@RYLSnmm
RYLSnmm / make-parts.py
Last active June 16, 2019 13:25
読めるランダム文字列を作る
import os
import pandas as pd
import regex
import romkan
# change here
dir = r"C:\files\dl\mecab-ipadic-2.7.0-20070801"
kanaset = set()
for file in [f for f in os.listdir(dir) if f.endswith(".csv")]:
@RYLSnmm
RYLSnmm / note.txt
Created April 2, 2018 06:28
テキストと画像の変換
あ → U+3042 → #3042 rgba(51, 0, 68, 0.133)
canvas 版は色が劣化するからうまく動かない
いつか動くようになればいいけど
pngjs 版は https://github.com/lukeapage/pngjs を browserify したものをロード必要
@RYLSnmm
RYLSnmm / ld-taglist-maker.js
Last active February 16, 2018 14:31
ライブドアブログでタグリストを作る
/*////////////////////////////////////////////////
ライブドアブログのタグ管理画面で実行する
http://livedoor.blogcms.jp/blog/ユーザ名/config/tag/
タグリストを生成する
/*////////////////////////////////////////////////
{
const user_name = Object(location.href.match(/\/blog\/(.*?)\/config\//))[1]