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 / dyna-highlight.user.js
Last active September 6, 2019 22:57
highlight code block on Dynalist
// ==UserScript==
// forked from https://talk.dynalist.io/t/multi-line-code-blocks/41/14?u=shota_senga
//
// @name DynaHighlight
// @namespace http://tampermonkey.net/
// @version 0.2
// @author Piotr S.
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.18.2/babel.js
// @require https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/6.16.0/polyfill.js
// @require https://cdnjs.cloudflare.com/ajax/libs/keyboardjs/2.3.3/keyboard.min.js
@shotasenga
shotasenga / eh-plus.user.js
Last active August 20, 2019 03:04
Eh+ add to calendar #GMS
// ==UserScript==
// @name Eh+ add link to add to calendar
// @namespace http://senta.me/
// @version 0.1.1
// @description try to take over the world!
// @author You
// @match https://eh-plus.com/book-online*
// @grant none
// ==/UserScript==
@shotasenga
shotasenga / find-errors.js
Created August 1, 2019 21:18
Vuelidate list all errors
function findErrors($v, prefix = "", flat = []) {
Object.keys($v)
.filter(k => $v[k].$invalid || $v[k] === false)
.forEach(k => {
if (typeof $v[k] === "boolean") {
flat.push(prefix + "." + k)
} else {
return findErrors($v[k], `${prefix}.${k}`, flat)
}
})
@shotasenga
shotasenga / Pipfile
Created June 22, 2019 18:49
Create transcript from MP3 file by using GCP Speech to text API
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
google-cloud-speech = "*"
pydub = "*"
@shotasenga
shotasenga / setting.txt
Last active December 5, 2018 05:27
Surfingkeys
map("<Ctrl-f>", "d");
map("<Ctrl-b>", "e")
// -------------------------------------------------------
// an example to create a new mapping `ctrl-y`
mapkey('<Ctrl-y>', 'Show me the money', function() {
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
// an example to remove mapkey `Ctrl-i`
@shotasenga
shotasenga / moneyfoward-vending-machine-or-not.user.js
Last active December 4, 2018 15:22
マネーフォーワードの食費を自販機の消費かどうか振り分けるボタン追加
// ==UserScript==
// @name MoneyFoward is it vendning machine?
// @namespace http://senta.me/
// @version 0.1.2
// @description マネーフォーワードの食費を自販機の消費かどうか振り分けるボタン追加
// @author @__senta
// @match https://moneyforward.com/cf
// @grant none
// ==/UserScript==
;(() => {
@shotasenga
shotasenga / reactup.fish
Created November 10, 2018 06:19
quick up and running new React application by using create-react-app with PNP
# reactup new-awesome-react-app
# 1. it ceates a new react application
# 2. move to the directory
# 3. open it in VSCode
# 4. run it
function reactup
npx create-react-app $argv --use-pnp
cd $argv[0]
code .q
yarn start
@shotasenga
shotasenga / Info.plist
Last active July 31, 2022 06:58
Custom URL scheme handler with AppleScript
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleAllowMixedLocalizations</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>applet</string>
@shotasenga
shotasenga / highlight-current-time.user.js
Created March 28, 2018 04:48
Aipo Highlight Current Time
// ==UserScript==
// @name Aipo Highlight Current Time
// @namespace http://senta.me/
// @version 0.0.1
// @description Highlight Current Time on Calendar View
// @author @__senta
// @match https://app.aipo.com/*
// @grant none
// ==/UserScript==