Skip to content

Instantly share code, notes, and snippets.

View gimKondo's full-sized avatar
✔️
no problem

Daisuke Kondo gimKondo

✔️
no problem
View GitHub Profile
@gimKondo
gimKondo / deploy-feature-by-pr-comment.yaml
Created June 10, 2020 15:59
Deploy feature branch by pull request comment
name: deploy dev from feature by pull request
on:
issue_comment:
types:
- created
jobs:
deploy:
# add comment of pull request && comment is KEYWORD
@gimKondo
gimKondo / slack_hook_events.py
Created June 7, 2019 07:43
Hook and notify channel creation and emoji registration of Slack
import os
import json
import logging
import urllib.request
# Bot's "Verification Token" at "Basic Information"
SLACK_VERIFY_TOKEN = os.environ['SLACK_VERIFY_TOKEN']
# Bot's "Bot User OAuth Access Token" at "Install App"
SLACK_BOT_USER_ACCESS_TOKEN = os.environ['SLACK_BOT_USER_ACCESS_TOKEN']
# User name of response bot
@gimKondo
gimKondo / gist_sample.md
Last active March 4, 2019 03:33
Gist-VSCode連携サンプル

Gist連携テスト用サンプル

使い方

VSCodeから編集

[user]
name = MyName
email = MyMailAddres
[core]
excludesfile = ~/gitconf/.global_gitignore
attributesfile = ~/gitconf/attributes
[merge]
ff = false
[pull]
ff = only
@gimKondo
gimKondo / dein-install-report.md
Last active December 1, 2016 03:18
behavior of dein#local and dein#add(dein.vim)

前提

  • ~/.vim/dein/repos/github.com/Shougo/dein.vimにdeinをgit clone
  • vimrcを以下のように記述してcall dein#install
" vimrc
set nocompatible
set runtimepath+=~/.vim/dein/repos/github.com/Shougo/dein.vim

call dein#begin(expand('~/.vim/dein'))
-- Ordering and De-maybe Evaluating Nonsense operator
(-#@|>) :: Maybe a -> (a->b) -> Maybe b
Just x -#@|> f = Just (f x)
Nothing -#@|> _ = Nothing
main :: IO()
main = do
print $ Nothing -#@|> (+ 3)
print $ Just 2 -#@|> (+ 3)
#include <iostream>
template <typename VAL, typename FUNC>
inline typename std::result_of<FUNC(const VAL&)>::type
invoke(const VAL& trg, FUNC func)
{
return func(trg);
}
template <typename VAL, typename FUNC>
inline typename std::result_of<FUNC(VAL&)>::type
setlocal foldmethod=expr
setlocal foldexpr=MarkdownFold()
function! MarkdownFold()
let head = s:head(v:lnum)
if head
return head
" end fold of this level when nexe and nexe line is title and nexe line is empty
elseif v:lnum + 1 < line('$') && getline(v:lnum + 1) == "" && getline(v:lnum + 2) =~ '^#'
return '<' . s:head(v:lnum + 2)
#include <vector>
#include <iostream>
#include <memory>
#include <functional>
#include <type_traits>
// interface of filtered object
template <typename SRC_E> struct IFiltered
{
~IFiltered() {}
@gimKondo
gimKondo / non-override-put.vim
Created December 16, 2013 16:34
substitute text that selected on visual-mode without overriding register bug: multibyte charactor on line-end cannot be judged well
function! Put_text_without_override_register()
let line_len = strlen(getline('.'))
execute "normal! `>"
let col_loc = col('.')
execute 'normal! gv"_x'
if line_len == col_loc
execute 'normal! p'
else
execute 'normal! P'
endif