Skip to content

Instantly share code, notes, and snippets.

View shotasenga's full-sized avatar

Shota Senga shotasenga

  • Canada
View GitHub Profile
@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 = "*"
@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 / 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