Skip to content

Instantly share code, notes, and snippets.

View shotasenga's full-sized avatar

Shota Senga shotasenga

  • Canada
View GitHub Profile
@shotasenga
shotasenga / arch.conf
Last active August 3, 2021 05:39
Template for installing Arch Linux
title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options cryptdevice=UUID=<BLOCK ID>:arch root=/dev/mapper/arch-root resume=/dev/mapper/arch-swap rw intel_pstate=no_hwp
@shotasenga
shotasenga / next.config.js
Created February 20, 2020 00:37
next.config.js which enables built-in css and sass support with "includePaths" option
const path = require("path");
const withImages = require("next-images");
let config = {
distDir: "../../dist/client",
experimental: {
css: true,
scss: true
},
webpack: (config, { buildId, dev, isServer, defaultLoaders, webpack }) => {
@shotasenga
shotasenga / Pipfile
Last active December 28, 2020 05:24
internationalize Hugo content files
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
python-frontmatter = "*"
title slug date draft tags categories image
ソフトウェア開発者として海外🇨🇦で働く:就活・面接対策
work-in-canada-part2
2020-12-28 04:05:00 -0800
false
career
Life
hero.jpg
@shotasenga
shotasenga / git-sort
Last active November 18, 2021 07:31
git-sort (1)
#!/bin/bash
#
# Sort commit hash in topological order (oldest -> newest)
# *Unknown commit hash will be silently ignored
#
# This can be used to cherry-pick commits in appropriate order
# $ git cherry-pick `git sort hash-1 hash-2 ... hash-n`
# $ git cherry-pick `cat /path/to/commit-hash/file | git sort`
# create temporary file descriptor (see: https://unix.stackexchange.com/a/181938/501792)
@shotasenga
shotasenga / firepoker.io-bind-keys.user.js
Last active November 24, 2023 02:19
#UserScript Define keyboard shortcuts to vote on Firepoker.io
// ==UserScript==
// @name Firepoker.io Bind Keys
// @namespace https://shotasenga.com/
// @version 1.0.2
// @description Define keyboard shortcuts to vote on Firepoker.io
// @author [email protected]
// @match https://firepoker.io/
// @match https://firepoker.app/
// @grant none
// ==/UserScript==

https://www.gather.town/

Get the map ID

Object.values(gameSpace.gameState).find(x => x.name == 'Shota').map

Get current location

// ==UserScript==
// @name Copy page info to the clipboard
// @namespace https://shotasenga.com/
// @version 1.0.2
// @description CTRL+C to copy page info
// @author [email protected]
// @match *://*/*
// @grant GM_setClipboard
// @grant GM_notification
// ==/UserScript==
@shotasenga
shotasenga / google_photos_timestamp.py
Created August 24, 2024 02:31
Some of the photos exported from Google photos didn't have correct timestamp. This script adjust the date time info based on the exported JSON.
import re
import datetime
import piexif
import glob
import json
import os
from PIL import Image
import shutil
def iterate_images(directory):
@shotasenga
shotasenga / wealthsimple-transaction-for-ynab.user.js
Last active June 3, 2025 13:02
Export transactions from Wealthsimple to a CSV file for YNAB import
// ==UserScript==
// @name Export Wealthsimple transactions to CSV for YNAB
// @namespace https://shotasenga.com/
// @version 2025053000
// @description Export transactions from Wealthsimple to a CSV file for YNAB import
// @author Shota Senga
// @match https://my.wealthsimple.com/app/activity*
// @icon https://www.google.com/s2/favicons?sz=64&domain=wealthsimple.com
// @grant none
// ==/UserScript==