Skip to content

Instantly share code, notes, and snippets.

View tomoyat1's full-sized avatar
💭
Ignoring GitHub notifications, ping me through a separate channel :)

Tomoya Tabuchi tomoyat1

💭
Ignoring GitHub notifications, ping me through a separate channel :)
View GitHub Profile
@tomoyat1
tomoyat1 / styles.css
Created November 11, 2018 02:38
CSS Modules with snake-case class names and their TypeScript .d.ts files
.camelCase {
color: red;
}
.snake-case {
color: blue;
}
apiVersion: v1
kind: ConfigMap
metadata:
name: l5d-config
namespace: default
data:
config.yaml: |-
admin:
ip: 0.0.0.0
port: 9990
@tomoyat1
tomoyat1 / charset-and-encoding.hs
Last active October 11, 2017 00:32
HaskellにおけるUTF-8・Unicodeの表示
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.ByteString as BS
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import System.IO
foo :: T.Text
foo = "日本語"
main :: IO ()
@tomoyat1
tomoyat1 / extract-cover-from-files.sh
Created August 11, 2017 04:27
Script to extract cover art from music, organized as artist/album/track
#!/bin/zsh
for ar in ./*; do
if [ -d $ar ]; then
for al in $ar/*; do
alname=$(echo $al | cut -d'/' -f3)
coverart=$al/$alname.jpg
firstfile=$al/$(ls $al | head -1)
echo "dir:\t\t$al"
echo "coverart:\t$coverart"
@tomoyat1
tomoyat1 / match-on-move.diff
Created February 27, 2017 02:37
Patch to make tyrannical match cilents to tags on clients moving to another screen
diff --git a/init.lua b/init.lua
index 4e2791a..0e94bdb 100755
--- a/init.lua
+++ b/init.lua
@@ -184,12 +184,14 @@ end
--Match client
local function match_client(c, forced_tags, hints)
-- Don't prevent tags from being drag and dropped between screens
+ --[[
if hints and hints.reason == "screen" then

Keybase proof

I hereby claim:

  • I am tomoyat1 on github.
  • I am tomoyat1 (https://keybase.io/tomoyat1) on keybase.
  • I have a public key whose fingerprint is D570 7665 12CC 1F48 E747 82EF 87DF A9C5 DC63 CBD0

To claim this, I am signing this object: