Skip to content

Instantly share code, notes, and snippets.

@nametake
nametake / acceptance.md
Last active June 7, 2022 08:00
テスト要件テンプレート

簡易テストスライダー(オプション)

💡 どこまでテストを実施すればいいかの基準にする(記入しなくても良い)
1 2 3 4 5
機能のリリース期日 期日を伸ばせる 期日が伸ばせない
不具合時に業務が止まるか 止まらない 止まる
function JumpDefinitionWithSetTagStack() abort
let l:old_location = [bufnr('%'), line('.'), col('.'), 0]
let l:tagname = expand('<cword>')
let l:winid = win_getid()
call settagstack(l:winid, {'items': [{'from': l:old_location, 'tagname': l:tagname}]}, 'a')
call settagstack(l:winid, {'curidx': len(gettagstack(l:winid)['items']) + 1})
call CocAction('jumpDefinition')
endfunction
nnoremap <Plug>(jump-definition-with-settagstack) :<C-u>call JumpDefinitionWithSetTagStack()<CR>
@nametake
nametake / vim_ime.json
Created June 6, 2018 02:14
Turn IME off when ESC or ^[ is pressed at vim bind application
{
"title": "Turn IME off when ESC or ^[ is pressed at vim bind application",
"rules": [
{
"description": "Turn IME off when ESC or ^[ is pressed at vim bind application",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "escape",
@nametake
nametake / main.go
Last active April 30, 2017 06:49
Goのコードの中から文字列のhoge変数を見つけるコード
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
)
func main() {
@nametake
nametake / private.xml
Last active July 14, 2017 06:08
karabinerのprivate.xmlファイル
<?xml version="1.0"?>
<root>
<appdef>
<appname>iTERM2</appname>
<equal>com.googlecode.iterm2</equal>
</appdef>
<appdef>
<appname>MACVIM</appname>
<equal>org.vim.MacVim</equal>
</appdef>
package main
import (
"fmt"
"sync"
"time"
)
func main() {
d := &dispatcher{
@nametake
nametake / readwriter.go
Created March 17, 2017 01:57
ReadWriterのテストコード
package main
import (
"encoding/json"
"fmt"
)
func main() {
u := &user{
Name: "nameki",
@nametake
nametake / main.go
Last active November 21, 2016 01:16
Goの複数スレッドを制御するための一案
package main
import (
"context"
"fmt"
"strings"
"time"
)
const SLEEP_SEC = 0
@nametake
nametake / vim-version.log
Last active August 10, 2016 01:51
vim --version comp
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Aug 10 2016 10:00:18)
MacOS X (unix) 版
適用済パッチ: 1-2187
Compiled by nameki-shogo@SYS-Ebisu-0011.local
Huge 版 with MacVim GUI. 機能の一覧 有効(+)/無効(-)
+acl +float +mouse_sgr +tag_old_static
+arabic +folding -mouse_sysmouse -tag_any_white
+autocmd -footer +mouse_urxvt -tcl
+balloon_eval +fork() +mouse_xterm +termguicolors
+browse +fullscreen +multi_byte +terminfo
@nametake
nametake / matchindexgetter.py
Created July 10, 2016 05:40
Get match index list from list.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
class MatchIndexGetter(object):
def __init__(self, list):
self._list = list
self._input_string = ''
def add_char(self, char):