Skip to content

Instantly share code, notes, and snippets.

let g:PYTHON3 = has('python3')
let g:PYTHON = has('python') || has('python3')
let g:UNIX = has('unix') || has('macunix') || has('win32unix')
if has('multi_byte')
let g:UNICODE = 0
if &termencoding == ''
let &termencoding = &encoding
endif
if $LC_ALL =~? '\vutf-?8' || $LANG =~? '\vutf-?8'
# https://stackoverflow.com/a/63670795/4293785
parameters:
- name: RunTask
displayName: Run task?
type: boolean
default: true
steps:
- pwsh: Write-Host "always run this task"
@dracorp
dracorp / gist:c365dc1ff6320250ab2d40b1e738e7b9
Created April 12, 2022 07:10
Compare Map arrays in Groovy
import groovy.util.Eval
def compareArrays(def first, def path = '', def second) {
if (first instanceof java.util.LinkedHashMap) {
first.each { index, value ->
if ( index.indexOf('-') > 0 ) {
index = index.inspect()
}
if ( value instanceof java.util.LinkedHashMap ) {
def newPath = path ? path + "." + index : index
[user]
gui = gitk
[push]
default = current
;default = matching
;default = simple
[rebase]
autosquash = false
[core]
autocrlf = false
🌺 Minimalist Vim Plugin Manager
KeyPress event, serial 34, synthetic NO, window 0x4000001,
root 0x139, subw 0x0, time 356984, (-111,112), root:(600,476),
state 0x0, keycode 49 (keysym 0x60, grave), same_screen YES,
XLookupString gives 1 bytes: (60) "`"
XmbLookupString gives 1 bytes: (60) "`"
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x4000001,
root 0x139, subw 0x0, time 360368, (-107,104), root:(604,468),
state 0x0, keycode 94 (keysym 0x3c, less), same_screen YES,
@dracorp
dracorp / config.yml
Last active December 11, 2020 09:04
Yay configuration
{
"aururl": "https://aur.archlinux.org",
"buildDir": "$HOME/.cache/yay/",
"absdir": "$HOME/.cache/yay/abs",
"editor": "vim",
"editorflags": "",
"makepkgbin": "/usr/bin/makepkg",
"makepkgconf": "",
"pacmanbin": "/usr/bin/pacman",
"pacmanconf": "/etc/pacman.conf",
@dracorp
dracorp / web-servers.md
Created January 28, 2020 14:12 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@dracorp
dracorp / bash-it-overwrite.plugin.bash
Created April 17, 2019 15:03
Put this file into ~/.bash-it/custom/
function k8s_context_prompt {
local kube_namespace
kube_namespace="$(kubectl config view --minify --output 'jsonpath={..namespace}' 2>/dev/null)"
# Set namespace to 'default' if it is not defined
kube_namespace="${kube_namespace:-default}"
echo -e "$(kubectl config current-context):${kube_namespace}"
}
# See also http://vim-taglist.sourceforge.net/manual.html
# ~/.ctags
--regex-sh=/^[ \t]*(typeset|local)?[ \t]*([A-Za-z0-9_-]+)=/\2/v,variable,variables/
--regex-sh=/^[ \t]*(readonly|declare -r)[ \t]*([A-Za-z0-9_-]+)=/\2/c,constant,constants/
# ~/.vim/vimrc
let tlist_sh_settings = 'sh;f:functions;v:variables;c:constants'
let g:tagbar_type_sh = {
\ 'kinds':[
\ 'f:functions',