Skip to content

Instantly share code, notes, and snippets.

@mtyurt
mtyurt / ansible-vim-goto-role-tasks.vim
Last active April 20, 2023 01:21
With pearofducs/ansible-vim plugin installed, following mapping behaves like `gf`, navigates to role under cursor's tasks/main.yml file. Ideal to be used in playbooks
" vim-plug example
call plug#begin('~/.vim/plugged')
Plug 'pearofducks/ansible-vim'
call plug#end()
let g:ansible_goto_role_paths = './roles,../_common/roles'
function! FindAnsibleRoleUnderCursor()
if exists("g:ansible_goto_role_paths")
let l:role_paths = g:ansible_goto_role_paths
@mtyurt
mtyurt / keybase.md
Created December 10, 2017 19:00
keybase prove

Keybase proof

I hereby claim:

  • I am mtyurt on github.
  • I am mtyurt (https://keybase.io/mtyurt) on keybase.
  • I have a public key ASBRT_4EgTvX8RygVGIioxHJih83_dKwWbgsSpPE-il1fQo

To claim this, I am signing this object:

#!/bin/bash -ex
sendSlackMsg(){
curl -X POST --data-urlencode "payload={\"channel\": \"$1\", \"attachments\": [{\"title\":\"Merged branches report:\", \"text\":\"$2\",\"mrkdwn_in\":[\"text\"]}], \"icon_emoji\":\":shipit:\"}" https://hooks.slack.com/services/incoming-webhook-url
}
#user-defined
cd $REPO
git fetch -a --prune
declare -a textArray
git branch -r --merged origin/master | \
awk '{branch=substr($1,8); if(branch!="HEAD" && branch!="master") {print branch}}' | {