Skip to content

Instantly share code, notes, and snippets.

View weilbith's full-sized avatar
🏈

Thore Strassburg weilbith

🏈
  • Brainbot Technologies
  • Berlin
View GitHub Profile
@pascalpoitras
pascalpoitras / config.md
Last active April 28, 2024 23:12
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@s-panferov
s-panferov / option.ts
Created November 30, 2014 12:15
Option and Result types from Rust in TypeScript
interface Option<T> {
map <U>(fn: (a: T) => U): Option<U>;
isSome(): boolean;
isNone(): boolean;
isSomeAnd(fn: (a: T) => boolean): boolean;
isNoneAnd(fn: () => boolean): boolean;
unwrap(): T;
unwrapOr(def: T): T;
unwrapOrElse(f: () => T): T;
map<U>(f: (a: T) => U): Option<U>;
@guiniol
guiniol / neomuttrc
Created October 14, 2017 07:30
neomutt/notmuch configuration
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"
@rkrzr
rkrzr / auto_tags.py
Last active April 10, 2024 11:14
Automatically generate ansible tags of the same name for each role in a playbook
"""
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:
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/
@PatOConnor43
PatOConnor43 / after-plugin-_load_lua.vim
Last active August 19, 2022 20:38
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.
" 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)