Skip to content

Instantly share code, notes, and snippets.

View kazgoto's full-sized avatar

Kazutaka Goto kazgoto

View GitHub Profile
@kazgoto
kazgoto / my-custom-setting.json
Created January 7, 2021 09:08
Karabiner-Elements用カスタム設定
{
"title": "オリジナル",
"rules": [
{
"description": "[my] Screen Brightness (fn + cmd + up/down)",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "down_arrow",
wget --mirror –w 2 –p -E --convert-links –P ./ https://example.com/
# see more options: https://linux.die.net/man/1/wget
cd example.com/
php -S localhost:8081
# open URL http://localhost:8081 on your browser
@kazgoto
kazgoto / speech-api-test.html
Created April 14, 2021 06:59
Simple Speech API test application for Chrome
<html>
<body>
<textarea class="form-control" rows="5" readonly></textarea>
<br>
<button type="button" class="btn btn-primary">Recognize</button>
<script type="text/javascript">
const recognition = new webkitSpeechRecognition();
const textarea = document.querySelector('textarea');
const button = document.querySelector('button');
button.addEventListener('click', function () {
@kazgoto
kazgoto / batch-delete-email.gs
Last active December 15, 2021 08:14
Gmail で特定ラベルの大量なメールを削除するバッチ関数(どっかで拾ったもの)
function batchDeleteEmail() {
var loopNumber = 50
var batchSize = 100 // Process up to 100 threads at once
var searchSize = 400 // Limit search result to a max of 400 threads. Use this if you encounter the "Exceeded maximum execution time" error
for (i = 0; i < loopNumber; i += 1) {
var threads = GmailApp.search('label:XXXX', 0, searchSize);
for (j = 0; j < threads.length; j += batchSize) {
GmailApp.moveThreadsToTrash(threads.slice(j, j + batchSize));
}
@kazgoto
kazgoto / macos-office-emacs-keybinds.json
Created July 26, 2022 04:15
macOS の Microsoft Office 向け Karabiner Elements 用 Emacs キーバインド設定(オリジナル https://hattomo.github.io/posts/main/21/q1/0215-karabiner-office/ + Teams追加)
{
"title": "Microsoft Office で Emacs キーバインド",
"rules": [
{
"description": "Microsoft Office で Emacs キーバインド",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "b",
@kazgoto
kazgoto / expand-table-height-on-freee.css
Last active January 6, 2025 08:28
additional styles to expand the table height on freee (https://secure.freee.co.jp/reports/profit_and_loss)
.report-table-container.table-scrollable-wrapper {
height: 1200px !important;
}
@kazgoto
kazgoto / emacs-cursor-keybinds-for-superlist.json
Last active December 24, 2024 02:00
Emacs cursor keybinds for Superlist with Karabiner-Elements
{
"description": "Emacs cursor for Superlist",
"manipulators": [
{
"description": "ctrl-f",
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.superlist\\.superlist\\.app$"
{
"description": "Cmd+Shift+Space で英語入力に切り替える(1Password Quick Access 利用時に英字入力へ強制切り替え)",
"manipulators": [
{
"from": {
"key_code": "spacebar",
"modifiers": { "mandatory": ["left_shift", "left_command"] }
},
"to": [
{ "select_input_source": { "language": "en" } },