Skip to content

Instantly share code, notes, and snippets.

@hushin
hushin / main.js
Created September 10, 2024 11:33
Googleのマイアクティビティを日付指定で開く
function generateMyActivityURLJST(date) {
const startDate = new Date(`${date}T00:00:00+09:00`);
const endDate = new Date(`${date}T23:59:59+09:00`);
// ミリ秒単位のタイムスタンプをマイクロ秒に変換
const min = startDate.getTime() * 1000;
const max = endDate.getTime() * 1000 + 999999;
// Google My Activity の URL を生成
const url = `https://myactivity.google.com/myactivity?min=${min}&max=${max}`;
// ==UserScript==
// @name Remove UTM and fbclid Parameters
// @namespace http://tampermonkey.net/
// @version 1.3
// @description Remove UTM and fbclid parameters from URL and navigate to clean URL
// @author hushin
// @match *://*/*
// @grant none
// ==/UserScript==
@hushin
hushin / backup-gist.sh
Last active January 7, 2024 10:20
GitHub リポジトリをバックアップするスクリプト。Synology NAS で実行する
#!/bin/bash
GITHUB_TOKEN="ghp_xxx"
CLONE_DIR="${HOME}/backup/gist"
# Function to clone or update a Gist
clone_or_update_gist() {
gist_url=$1
gist_description=$2
gist_id=$(basename "$gist_url")
@hushin
hushin / v2.ahk
Created January 3, 2024 13:05
AutoHotKey でキーバインドをMac風に変更
; REMOVED: #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Requires AutoHotkey v2.0
#Warn ;Enable warnings to assist with detecting common errors.
#SingleInstance force
InstallKeybdHook()
#WinActivateForce
#UseHook
SendMode("Input") ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir(A_ScriptDir) ; Ensures a consistent starting directory.
DetectHiddenWindows(true)

JSConf JP 2023

概要

セッション

Opening

  • 古川さん
;(async (copy) => {
// https://read.amazon.co.jp/kindle-library を開いて実行
// ASINコードがクリップボードにコピーされているので
// https://booklog.jp/input に貼り付けて登録
async function fetchList(paginationToken) {
const pagination = paginationToken
? `&paginationToken=${paginationToken}`
: ''
const res = await fetch(

Figma

https://www.figma.com/

UI デザインツール

自分なりの学習方針

  • なるべく公式のものを参照する
    • Figmaはアップデートが多い
      • 公式以外の情報(個人ブログ等)は内容が古くなっている場合がある
@hushin
hushin / README.md
Last active November 30, 2021 13:09
Kindle本 をブクログで蔵書管理 2021年秋版

Kindle本をブクログで蔵書管理する最初の一歩 | ちぎっては投げるところ をいうのを書いたが、 最近Kindle本をブクログに自動登録するスクリプトが動かなくなった(Amazonから送られてくるメールにASINが入らなくなった)。

自動化が難しそうだったので手動で取り込む方法をメモっておく

手順

Amazon.co.jp: コンテンツと端末の管理 / https://www.amazon.co.jp/mn/dcw/myx.html#/home/content/booksAll/dateDsc/ を開く

ブラウザのdev tool で下記scriptを実行

@hushin
hushin / README.md
Last active November 30, 2021 12:16
MoneyForward の未分類の項目を一括で設定するスクリプト

MoneyForward の未分類の項目を一括で設定するスクリプト

手作業でぽちぽちするのが辛かったので作った

使い方

修正が必要な箇所