Skip to content

Instantly share code, notes, and snippets.

@hushin
hushin / settings.json
Created August 23, 2020 06:37
Windows Terminal Settings
// This file was initially generated by Windows Terminal 1.1.2021.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@hushin
hushin / ghq.md
Last active May 6, 2023 14:33
ghq フォルダ整理

ghq フォルダ整理

ghq でリポジトリ管理していて、フォルダ整理したくなったので調べながら書いたコマンド集

そもそもgit管理してないフォルダを見つける

ghq root/github.com/hoge/fuga のような階層になっていること前提

// http://tateren.hateblo.jp/entry/2016/10/03/025425 を参考にしています
// ブクログのアカウント情報
var scriptProperties = PropertiesService.getScriptProperties();
var ACCOUNT = scriptProperties.getProperty('BOOKLOG_ACCOUNT');
var PASSWORD = scriptProperties.getProperty('BOOKLOG_PASSWORD');
function AutoRegistToBooklog() {
// 受信トレイにある注文メールを検索
var query = "from:digital-no-reply@amazon.co.jp in:inbox"
@hushin
hushin / MacLikeKeybind.ahk
Last active October 4, 2020 09:58
Windows のキーバインドを Mac っぽくする設定
# keyhac config file
# https://crftwr.github.io/keyhac/doc/ja/index.html
import sys
import os
import datetime
import pyauto
from keyhac import *
def configure(keymap):
@hushin
hushin / README.md
Last active January 12, 2019 02:16
backup-twitter

backup-twitter

ref. https://devonzuegel.com/post/twitter-backup

setup

gem install t twurl
# copy consumer key https://developer.twitter.com/en/apps
twurl authorize --consumer-key {YOUR APP'S CONSUMER KEY} --consumer-secret {YOUR APP'S CONSUMER SECRET}
@hushin
hushin / a.fish
Created January 6, 2019 03:21
fish でデフォルト引数っぽいの
# https://stackoverflow.com/questions/45726573/
function myfunc -a num
set -q num[1] || set num 10
echo 'myfunc' $num
end
// ==UserScript==
// @name ニコレポを見やすくするやつ
// @namespace https://twitter.com/hush_in
// @version 0.1
// @description ニコレポを見やすくするやつ
// @author hush_in
// @match https://www.nicovideo.jp/my/top
// @grant none
// ==/UserScript==
{
@hushin
hushin / tweetdeck.css
Last active September 23, 2018 00:06
.column:nth-child(1) {
width: 600px;
}
.column:nth-child(1) .item-box:not(:hover) .tweet-footer {
display: none;
}
.column:nth-child(1) .js-stream-item-content {
padding: 3px;

Letterspace から markdown file への移行メモ

  • iCloud の Letterspace にテキストファイルがあるので、ファイル名を変えたい
    • iCloud 使ってないとき、 ~/Library/Containers/com.x10studio.LetterspaceMac/Data/Documents/Home にファイルがある
    • 適当なフォルダにコピーして作業
  • 予めファイル名の空白をハイフンに置換しておく
    • find . -name "* *" -print0 | xargs -0 rename 's/ /-/g'
  • 更新日をファイル名につける
    • ls -l --time-style='+%Y-%m-%d' | grep -v total | awk '{ printf("%s %s-%s\n", $7, $6, $7) }' | xargs -n 2 mv
  • 参考 大量のファイルをシェルのコマンドで一括リネームする | Developers.IO
@hushin
hushin / memo.md
Created December 27, 2017 06:48
AndroidでBluetoothキーボード使うときのメモ