Skip to content

Instantly share code, notes, and snippets.

View kdnk's full-sized avatar
💭
🚀

Kodai Nakamura kdnk

💭
🚀
View GitHub Profile
# focus window
# | | i3-wm | yabai |
# | ---------------- | ----------- | ---------- |
# | フォーカスの移動 | $mod + jkl; | alt + hjkl |
alt - h : yabai -m window --focus west
alt - j : yabai -m window --focus stack.next || yabai -m window --focus south
alt - k : yabai -m window --focus stack.prev || yabai -m window --focus north
alt - l : yabai -m window --focus east
@kdnk
kdnk / holiday.vba
Last active December 25, 2022 22:07
VBA 振替休日
Function IsHoliday(holidayCollection As Collection, day As Date) As Boolean
IsHoliday = False
Dim index as long
Dim holiday as Date
For index = 1 to holidayCollection.Count
holiday = holidayCollection.Item(index)
If holiday = day Then
IsHoliday = True
Exit For
End if
/* ======= AUTOTAG MODE v0.4.1========
* Pre-requisites -
* For NLP dates: Roam42 https://roamjs.com/extensions/roam42
* For PageSynonyms: Page Synonyms https://roamjs.com/extensions/page-synonyms
* Hat-tips: Azlen for arrive.js idea; Tyler Wince for Unlink Finder; Chris TftHacker for Roam42; Murf for demystifying JS and refactoring the regex; David Vargas for everything!
*/
/* ======= OPTIONS ======= */
let caseinsensitive = !0, // change to 0 to only tag references with exact case, otherwise it will alias, e.g., [book]([[Book]])
@kdnk
kdnk / init.lua
Created March 15, 2021 13:12
[Hammerspoon] tackboll scroll & reload with simultaneously (left & right) click
--------------------------------------------------------------
-- HANDLE SCROLLING & RELOAD
--------------------------------------------------------------
-- ref. https://github.com/tekezo/Karabiner/issues/814#issuecomment-337643019
local shouldFireOriginalRightMouseDown = false
local leftDowned = false
local rightDowned = false
overrideLeftMouseDown = hs.eventtap.new({ hs.eventtap.event.types.leftMouseDown }, function(e)
@kdnk
kdnk / romantable.txt
Last active May 10, 2021 02:17 — forked from youcune/romantable.txt
AZIK配列のいつも使うGoogle日本語入力用ローマ字テーブル
~ ~
, 、
. 。
/ ・
: ー
- ー
; っ
[ 「
] 」
@kdnk
kdnk / escape_twice.json
Created January 16, 2021 13:02
コントロールキーを二度押しで Escape にするための karabier の設定
{
"description": "escape by control twice",
"manipulators": [
{
"type": "basic",
"conditions": [
{
"type": "variable_if",
"name": "invoke-escape",
"value": 1
body {
font-size: 16px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
letter-spacing: -0.001em;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
@media (prefers-color-scheme: dark) {
class Symbol
  def to_proc
    Proc.new do |obj, *args|
      obj.send self, *args
    end
  end
end
@kdnk
kdnk / .cvimrc
Last active April 22, 2018 06:43
set autoupdategist
map <C-h> :execute <Delete>
map <C-a> beginningOfLine
map <C-u> scrollPageUp
map <C-d> scrollPageDown
map u lastClosedTab
iunmap <C-k>
declare -i i=1
for source in $(ls *mp3); do
n=${source%%.mp3}
mp3splt -o '@a-@t' -d ho/ -c ~/Desktop/EK_DU30F_20110614/du_${i}.cue $source
i=$((i + 1))
done