Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan Burnette ryanburnette

View GitHub Profile
@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
}
}
}
@ryanburnette
ryanburnette / php-fpm.conf
Created Jul 14, 2020
php fpm settings for slightly better reliability
View php-fpm.conf
# https://serverfault.com/a/575946/203448
emergency_restart_threshold = 3
emergency_restart_interval = 20s
process_control_timeout = 5s
@ryanburnette
ryanburnette / mysql.cnf
Created Jul 13, 2020
mysql no zero date issue
View mysql.cnf
# /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
You can’t perform that action at this time.