Skip to content

Instantly share code, notes, and snippets.

View arai-ta's full-sized avatar
🏠

ARAI Takashi arai-ta

🏠
View GitHub Profile
@arai-ta
arai-ta / keymap.rb
Created September 4, 2023 16:08
PRK Firmware keymap.rb for hifumi macropad
puts "==== hifumi ===="
kbd = Keyboard.new
kbd.init_pins(
[ 4, 5 ], # row pin number = GPIO4, GPIO5
[ 29, 28, 27 ] # col pin number = GPIO29 - 27
)
kbd.add_layer :default, %i[
@arai-ta
arai-ta / keymap.rb
Last active December 23, 2022 14:44
Plancky handmade keyboard firmware based on PRK Firmware
puts "=== Plancky ==="
kbd = Keyboard.new
kbd.init_pins(
[ 21, 23, 20, 22 ],
[ 26, 27, 28, 29, 9, 8, 7, 6, 5, 4, 3, 2 ]
)
kbd.add_layer :default, %i[
@arai-ta
arai-ta / keymap.rb
Last active November 4, 2022 09:11
GRIN Type-R keymap
puts "=== GRIN Type-R ==="
kbd = Keyboard.new
kbd.init_pins(
[ 20, 19, 18, 17, 16 ],
[ 8, 7, 6, 2, 3, 4, 5, 10, 15, 14, 13, 12, 11, 9, 21 ]
)
kbd.add_layer :default, %i[
@arai-ta
arai-ta / keymap.rb
Last active January 18, 2022 00:20
仮称 "SS60pi" ファームウェア
# Initialize a Keyboard
kbd = Keyboard.new
# Initialize GPIO assign
kbd.init_pins(
#[ 8, 9, 10, 11, 12 ], # row0, row1,... respectively
#[ 2, 3, 4, 5, 6, 7 ] # col0, col1,... respectively
# If you put USB port on the right side, use below instead
[ 6, 7, 8],
[ 2, 3, 4]
@arai-ta
arai-ta / hstrype.sh
Created May 9, 2021 18:10
新しいキーボードでコマンドの練習をするためのスクリプト
#!/bin/sh
TMPFILE=/tmp/`basename $0`.tmp
if [ $# = 0 ]
then
echo "Usage: `basename $0` " '$HISTFILE'
exit 1
fi
@arai-ta
arai-ta / moon.sh
Created March 21, 2021 15:43
月のめぐり
#!/bin/sh
while :
do
for moon in 🌑 🌒 🌓 🌔 🌕 🌖 🌗 🌘
do
printf "$moon\r"
sleep 0.1
done
done
@arai-ta
arai-ta / git-open
Last active March 27, 2018 15:50
open current branch (+ specified file) in browser (GitHub)
#!/bin/bash
# newer version is available in https://github.com/arai-ta/git-open
set -e
set -u
#set -x
if ! git show >/dev/null
then
@arai-ta
arai-ta / list-network-status.sh
Created March 6, 2018 11:22
Macのネットワーク状況を表示するコマンド
#!/bin/sh
# WiFi
networksetup -getairportnetwork en0
# List service & status
networksetup -listallnetworkservices | \
sed -e '1d' | \
while read s
do
networksetup -getinfo "$s" | \
@arai-ta
arai-ta / chatwork-ex-shortcut.user.js
Created March 6, 2018 11:01
chatworkのフィルタ切り替えやフォーカス外しにショートカットを割り当てるUserScript
// ==UserScript==
// @name ctrl key shortcut
// @namespace http://www.chatwork.com/
// @version 0.2
// @description try to take over the world!
// @author arai@chatwork.com
// @match https://www.chatwork.com/*
// @grant none
// ==/UserScript==
@arai-ta
arai-ta / file0.xml
Last active May 11, 2017 15:08
iOS機器(iPhone, iPad)でWi-Fiに自動接続しないようにする ref: http://qiita.com/arai-ta/items/ea02b048d1f3dda8a64c
<?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>ConsentText</key>
<dict>
<key>default</key>
<string><!-- ここにインストール前の確認メッセージを入れます --></string>
</dict>
<key>PayloadContent</key>