Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Burnette ryanburnette

View GitHub Profile
@ryanburnette
ryanburnette / interfaces
Last active Feb 5, 2021
proxmox trunk interface with management interface on clan
View interfaces
auto lo
iface lo inet loopback
iface eno1 inet manual
iface eno2 inet manual
iface eno3 inet manual
iface eno4 inet manual
auto vmbr0
iface vmbr0 inet manual
@ryanburnette
ryanburnette / gist:0e6a0159f58052aec119ab87fdd6be99
Created Oct 12, 2020
proxmox get apt working without subscription
View gist:0e6a0159f58052aec119ab87fdd6be99
# /etc/apt/sources.list
deb http://ftp.debian.org/debian buster main contrib
deb http://ftp.debian.org/debian buster-updates main contrib
# PVE pve-no-subscription repository provided by proxmox.com,
# NOT recommended for production use
deb http://download.proxmox.com/debian/pve buster pve-no-subscription
# security updates
deb http://security.debian.org/debian-security buster/updates main contrib
@ryanburnette
ryanburnette / lcwipe
Created Oct 7, 2020
life cycle controller wipe
View lcwipe
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
@ryanburnette
ryanburnette / async-await-experimentation.js
Created Aug 20, 2020
playing around with async/await... it's not as useful as I had hoped it would be
View async-await-experimentation.js
var _foo = 0;
async function foo() {
return new Promise(function (resolve) {
setTimeout(function () {
_foo++;
console.log(_foo);
resolve(_foo);
}, 1000);
});
}
@ryanburnette
ryanburnette / Caddyfile
Last active Aug 18, 2020
caddy cache strategy
View Caddyfile
(asset-paths) {
path *.bmp *.jpg *.png *.svg *.gif *.pdf *.css *.js
}
(cache) {
@content {
not {
import asset-paths
}
}
header @content cache-control max-age=0
@ryanburnette
ryanburnette / gist:9c6898493336f849e8280df7c3fd101b
Created Aug 16, 2020
markdownify for getting consistent results when you need a p tag on a single paragraph
View gist:9c6898493336f849e8280df7c3fd101b
{{- $markdown := .Inner | markdownify -}}
{{ if not ( findRE "<[h|p][^>]*>" $markdown ) }}
<p>{{ $markdown }}</p>
{{ else }}
{{ $markdown }}
{{ end }}
@ryanburnette
ryanburnette / caddy_snippet_log
Created Aug 7, 2020
snippet for caddy to set the log up to use the output and format I prefer
View caddy_snippet_log
(log) {
log {
output stdout
format console
}
}
@ryanburnette
ryanburnette / caddy_snippet_reverse_proxy_insecure
Created Aug 7, 2020
caddy snippet reverse_proxy_insecure
View caddy_snippet_reverse_proxy_insecure
(reverse_proxy_insecure) {
reverse_proxy * {
to {args.0}
transport http {
tls
tls_insecure_skip_verify
read_buffer 8192
}
}
}