Skip to content

Instantly share code, notes, and snippets.

View hdemon's full-sized avatar

Masami Yonehara hdemon

  • LINE
  • Fukuoka, Japan
  • 10:38 (UTC +09:00)
View GitHub Profile
@hdemon
hdemon / inputTextarea.js
Created December 20, 2015 13:13
Nightmare.action('type')のはやいやつ
Nightmare.action('inputTextarea', function(selector, text, done) {
this.evaluate_now(function(selector, text) {
document.querySelector(selector).value = text;
}, done, selector, text);
});
@hdemon
hdemon / 脱消耗.md
Last active May 21, 2020 14:41
福岡Iターン勢として、東京からの移住を検討する皆様の質問にお答えします

oops

@hdemon
hdemon / gist:e130b7427faa2c9841ed
Last active October 21, 2015 14:04
実数を受理するオートマトン
(define (get-next-state state-transition-table current-state input)
(nth (car (nth (state-transition-table) (+ 1 current-state))) ; リストの0番目は入力リストだから
(get-list-index (car (state-transition-table)) input)))
(define (state-transition-table-of-number)
(list (list #\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9 #\.)
(cons (list () 1 1 1 1 1 1 1 1 1 () ) #f)
(cons (list 1 1 1 1 1 1 1 1 1 1 2 ) #t)
(cons (list 2 2 2 2 2 2 2 2 2 2 () ) #t)))
@hdemon
hdemon / gist:c915fd0d15069dce2d49
Last active October 18, 2015 12:10
windows provisioning
cmd /c "mklink ~\.gitconfig ~\dotfiles\root\.gitconfig"
wget -uri http://pscx.codeplex.com/downloads/get/923562 -OutFile tmp.msi; Start-Process tmp.msi
;<s_expression> ::= <atomic_symbol>
; | "(" <s_expression> "." <s_expression> ")"
; | <list> .
;
;<_list> ::= <s_expression> <_list>
; | <s_expression> .
;
;<list> ::= "(" <s_expression> <_list> ")" .
;
;<atomic_symbol> ::= <letter> <atom_part> .
# install basic packages
sudo apt-get install /
git
curl
wget
vim
zsh
# Google日本語入力
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)
System: ubuntu: GNU/Linux
OS: GNU/Linux -- 3.19.0-15-generic -- #15-Ubuntu SMP Thu Apr 16 23:32:37 UTC 2015
Machine: x86_64 (x86_64)
Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
CPU 0: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz (6784.6 bogomips)
x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
CPU 1: Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz (6784.6 bogomips)
# Operator Type Precedence Description
# ’ ’ primary 5 Literal string
# " " primary 5 Literal string
# [ ] primary 5 Character class
# . primary 5 Any character
# (e) primary 5 Grouping
# e? unary suffix 4 Optional
# e* unary suffix 4 Zero-or-more
# e+ unary suffix 4 One-or-more
# &e unary prefix 3 And-predicate
# 全てのコンテナを消す
sudo docker ps -a | grep Exit | awk '{print $1}' | sudo xargs docker rm
# 全てのイメージを消す
sudo docker rmi $(sudo docker images -q)
nmap <C-n> noop
nmap <C-p> noop
nmap h moveLeftTab
nmap j scrollDown
nmap k scrollUp
nmap l moveRightTab