Skip to content

Instantly share code, notes, and snippets.

@towolf
towolf / base64.vim
Created January 5, 2021 15:25
.vim/after/plugin/unimpaired.vim
" Put into .vim/after/plugin/unimpaired.vim
function! B64_encode(str) abort
return substitute(system('base64', a:str),'\n','','g')
endfunction
function! B64_decode(str) abort
return system('base64 --decode', a:str)
endfunction
call UnimpairedMapTransform('B64_encode','[b')
# /etc/inputrc - global inputrc for libreadline
# See readline(3readline) and `info rluserman' for more information.
#"\C-xa": "ansible-playbook --diff playbooks/games/"
"\C-xc": "kubectl config use-context \C-i\C-i"
# Be 8 bit clean.
set input-meta on
set output-meta on
@towolf
towolf / gist:e5ee79bffcdd91aeb745c86855cc4daa
Last active October 8, 2020 22:34
KUBECONTEXT in PS1 bash prompt
__kctx () {
local ctx
ctx="$(kubectl config current-context)"
local col
local el
local b='\001\033[0m\033[38;5;88m\033[2m\002'
local c='\001\033[0m\033[38;5;124m\033[1m\002'
local u='\001\033[0m\033[38;5;88m\033[2m\002'
if [[ $ctx == *"prod"* ]]; then
@towolf
towolf / .htoprc
Created September 14, 2020 23:18
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=47
sort_direction=1
hide_threads=1
hide_kernel_threads=1
hide_userland_threads=1
shadow_other_users=0
show_thread_names=0
#!/bin/bash
#
# Copyright (c) 2014, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",

Keybase proof

I hereby claim:

  • I am towolf on github.
  • I am towolf (https://keybase.io/towolf) on keybase.
  • I have a public key whose fingerprint is BDCF BD1C 6C1C A953 160F 0C52 68B0 17E4 6AF4 E054

To claim this, I am signing this object: