Skip to content

Instantly share code, notes, and snippets.

Avatar
🏈

Thore Strassburg weilbith

🏈
View GitHub Profile
@PatOConnor43
PatOConnor43 / after-plugin-_load_lua.vim
Last active Mar 19, 2021
This is a minimal example configuration which should allow lua scripts to resolve lua modules that are loaded as a result of packer.nvim. `/` is not allowed as a filename in gist so `-`s are used in their place.
View after-plugin-_load_lua.vim
" This was taken from
" https://github.com/tjdevries/config_manager/blob/master/xdg_config/nvim/after/plugin/_load_lua.vim
let s:load_dir = expand('<sfile>:p:h:h:h')
exec printf('luafile %s/lua/init.lua', s:load_dir)
View ctags-solidity
vim ~/.ctags
--langdef=Solidity
--langmap=Solidity:.sol
--regex-Solidity=/^contract[ \t]+([a-zA-Z0-9_]+)/\1/c,contract/
--regex-Solidity=/[ \t]*function[ \t]+([a-zA-Z0-9_]+)/\1/f,function/
--regex-Solidity=/[ \t]*event[ \t]+([a-zA-Z0-9_]+)/\1/e,event/
--regex-Solidity=/[ \t]*(struct[ \t]+[a-zA-Z0-9_]+)([ \t]*\{)/\1/v,variable/
--regex-Solidity=/[ \t]*(enum[ \t]+[a-zA-Z0-9_]+)([ \t]*\{)/\1/v,variable/
--regex-Solidity=/[ \t]*mapping[ \t]+\(([a-zA-Z0-9_]+)[ \t]*=>[ \t]*([a-zA-Z0-9_]+)\)[ \t]+([a-zA-Z0-9_]+)/\3 (\1=>\2)/m,mapping/
@rkrzr
rkrzr / auto_tags.py
Last active Jan 7, 2021
Automatically generate ansible tags of the same name for each role in a playbook
View auto_tags.py
"""
This module implements an Ansible plugin that is triggered at the start of a playbook.
The plugin dynamically generates a tag for each role. Each tag has the same name as its role.
The advantage of this is that it saves you some boilerplate, because you don't have to wrap
all tasks of a role in an additional block and assign a tag to that.
Additionally, it works automatically when you add new roles to your playbook.
Usage is exactly the same as without this plugin:
@guiniol
guiniol / neomuttrc
Created Oct 14, 2017
neomutt/notmuch configuration
View neomuttrc
set realname = "Guillaume Brogi"
set from = "gui-gui@netcourrier.com"
set use_from = yes
set user_agent = yes
set sendmail = "/usr/bin/msmtp"
set editor = "nvim +/^$/+1 +':noh'"
set charset = "utf-8"
set send_charset = "utf-8"
set assumed_charset = "utf-8"
@pascalpoitras
pascalpoitras / myweechat.md
Last active May 4, 2021
My always up-to-date WeeChat configuration (weechat-dev)
View myweechat.md

WeeChat Screenshot

You need at least WeeChat 3.2-dev

Enable mouse

/mouse enable