Skip to content

Instantly share code, notes, and snippets.

Plugin 'ctrlpvim/ctrlp.vim.git'
let g:ctrlp_show_hidden = 1
let g:ctrlp_custom_ignore = { 'dir': '\v[\/](\.git|node_modules|rubygems|\.sass-cache|\.vagrant|bower_components|build|tmp|vendor|public.built)$' }
set wildignore+=.DS_Store
set wildignore+=*/node_modules/*
set wildignore+=*/bower_components/*
@ryanburnette
ryanburnette / lcwipe
Created October 7, 2020 12:58
life cycle controller wipe
winrm i LCWipe http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/root/dcim/DCIM_LCService?SystemCreationClassName=DCIM_ComputerSystem+CreationClassName=DCIM_LCService+SystemName=DCIM:ComputerSystem+Name=DCIM:LCService -u:root -p:calvin -r:https://192.168.41.101/wsman -SkipCNcheck -SkipCAcheck -encoding:utf-8 -a:basic
# create tmux session w/ a socket file
tmux -S /tmp/pairing new-session -s pairing
# open up permissions on the socket file
chmod 777 /tmp/pairing
# all users connect to tmux session using the socket
tmux -S /tmp/pairing attach-session -t pairing
@ryanburnette
ryanburnette / async-await-experimentation.js
Created August 20, 2020 16:33
playing around with async/await... it's not as useful as I had hoped it would be
var _foo = 0;
async function foo() {
return new Promise(function (resolve) {
setTimeout(function () {
_foo++;
console.log(_foo);
resolve(_foo);
}, 1000);
});
}
@ryanburnette
ryanburnette / gist:9c6898493336f849e8280df7c3fd101b
Created August 16, 2020 01:03
markdownify for getting consistent results when you need a p tag on a single paragraph
{{- $markdown := .Inner | markdownify -}}
{{ if not ( findRE "<[h|p][^>]*>" $markdown ) }}
<p>{{ $markdown }}</p>
{{ else }}
{{ $markdown }}
{{ end }}
smtp
authentication
TLS 1.2 encryption
@ryanburnette
ryanburnette / caddy_snippet_log
Created August 7, 2020 13:17
snippet for caddy to set the log up to use the output and format I prefer
(log) {
log {
output stdout
format console
}
}
@ryanburnette
ryanburnette / caddy_snippet_reverse_proxy_insecure
Created August 7, 2020 13:13
caddy snippet reverse_proxy_insecure
(reverse_proxy_insecure) {
reverse_proxy * {
to {args.0}
transport http {
tls
tls_insecure_skip_verify
read_buffer 8192
}
}
}
@ryanburnette
ryanburnette / php-fpm.conf
Created July 14, 2020 01:55
php fpm settings for slightly better reliability
# https://serverfault.com/a/575946/203448
emergency_restart_threshold = 3
emergency_restart_interval = 20s
process_control_timeout = 5s
@ryanburnette
ryanburnette / mysql.cnf
Created July 13, 2020 20:32
mysql no zero date issue
# /etc/mysql/mysql.conf.d/mysql.cnf
[mysqld]
sql_mode = ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION