Skip to content

Instantly share code, notes, and snippets.

View aileron's full-sized avatar

AILERON aileron

View GitHub Profile
@aileron
aileron / vcdal.js
Created March 3, 2023 10:11
vcdal.js
var $jscomp = $jscomp || {};
$jscomp.scope = {};
$jscomp.arrayIteratorImpl = function(a) {
var d = 0;
return function() {
return d < a.length ? {
done: !1,
value: a[d++]
} : {
done: !0
require 'nokogiri'
html = <<HTML
<main>
<div>plain div</div>
<div class="test">test</div>
<div class="test">test</div>
</main>
HTML
@aileron
aileron / youtube.html
Created November 10, 2022 08:13
background youtube video autoplay
<script src="https://cdn.jsdelivr.net/gh/thelevicole/youtube-to-html5-loader@4.0.1/dist/YouTubeToHtml5.js"></script>
<video data-yt2html5="https://www.youtube.com/watch?v=ScMzIvxBSi4" playsinline autoplay muted loop ></video>
<script>
new YouTubeToHtml5();
</script>
<style>
html, body {
margin: 0;
padding: 0;
}
require 'time'
wd = ["日", "月", "火", "水", "木", "金", "土"]
while line = gets
begin
pos = line.index('\t')
time_text = line[0..pos]
cmd = line[pos..line.size].strip
time = Time.parse(time_text)
@aileron
aileron / reloadDNS.sh
Created April 11, 2022 09:26
reloadDNS
alias reloadDNS="sudo killall mDNSResponder && sudo dscacheutil -flushcache"
@aileron
aileron / .py
Created February 1, 2022 05:47
Keyhac
import sys
import os
import datetime
import subprocess
from keyhac import *
def configure(keymap):
keymap_terminal = keymap.defineWindowKeymap( app_name="com.googlecode.iterm2" ) # iterm2だけのローカル設定
keymap_terminal["Ctrl-J"] = "104" # CTRL-Jを入力するとかなを送信。104はかなキーの仮想キーコード
set-option -g default-terminal screen-256color
# set-option -g default-command "reattach-to-user-namespace -l zsh"
set -g terminal-overrides 'xterm:colors=256'
set -g pane-border-status top
# Use vim keybindings in copy mode
setw -g mode-keys vi
# Setup 'v' to begin selection as in Vim
bind-key -T copy-mode-vi v send -X begin-selection
@aileron
aileron / .zshrc.prompt
Created August 3, 2021 01:47
.zshrc.prompt
# Pure
# by Sindre Sorhus
# https://github.com/sindresorhus/pure
# MIT License
# change this to your own username
DEFAULT_USERNAME='sindresorhus'
# threshold (sec) for showing cmd exec time
@aileron
aileron / .zhsrc.history
Created August 3, 2021 01:46
.zhsrc.history
# hisotry
HISTFILE=$HOME/.history # 履歴をファイルに保存する
HISTSIZE=10000000 # メモリ内の履歴の数
SAVEHIST=10000000 # 保存される履歴の数
setopt hist_ignore_dups # 重複を記録しない
setopt hist_ignore_all_dups
setopt hist_save_no_dups
setopt hist_reduce_blanks # スペース排除
setopt extended_history # 履歴ファイルに時刻を記録
setopt share_history # 端末間の履歴を共有
@aileron
aileron / .zshrc
Created August 3, 2021 01:45
.zshrc simple
#export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
export PATH=$PATH:$PWD/bin
export PATH=$PATH:$PWD/go/bin/
export PATH="/usr/local/sbin:$PATH"
export PATH="/Users/aileron/go/bin:$PATH"
export PATH="/opt/homebrew/opt/openssl@1.1/bin:$PATH"
export MECAB_PATH=/usr/local/Cellar/mecab/0.996/lib/libmecab.dylib
export EDITOR=vim