View postmark.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await postmark.sendEmail({ | |
From: 'api@ryanburnette.com', | |
ReplyTo: `${req.body.xname} <${req.body.xemail}>`, | |
To: to, | |
Cc: 'api-submissions@ryanburnette.com', | |
Subject: `ryanburnette.com api submission to ${req.body.form} from ${req.body.xname}`, | |
HtmlBody: html, | |
TextBody: text, | |
MessageStream: 'outbound', | |
Headers: [ |
View install-unifi.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get update | |
sudo apt-get install --yes ca-certificates apt-transport-https wget | |
echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list | |
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg | |
sudo apt update | |
sudo apt install --yes openjdk-8-jre-headless unifi | |
service unifi stop |
View set-timezone-america-new-york.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -u | |
sudo timedatectl set-timezone America/New_York |
View .vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/* |
View zfs_alerts.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
hostname=`hostname` | |
emaildomain='' | |
alertemail='' | |
mailgunapikey='' | |
# max capacity % before getting capacity alert | |
maxCapacity=80 |
View lcwipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
View async-await-experimentation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _foo = 0; | |
async function foo() { | |
return new Promise(function (resolve) { | |
setTimeout(function () { | |
_foo++; | |
console.log(_foo); | |
resolve(_foo); | |
}, 1000); | |
}); | |
} |
View Caddyfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(asset-paths) { | |
path *.bmp *.jpg *.png *.svg *.gif *.pdf *.css *.js | |
} | |
(cache) { | |
@content { | |
not { | |
import asset-paths | |
} | |
} | |
header @content cache-control max-age=0 |
View gist:9c6898493336f849e8280df7c3fd101b
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{- $markdown := .Inner | markdownify -}} | |
{{ if not ( findRE "<[h|p][^>]*>" $markdown ) }} | |
<p>{{ $markdown }}</p> | |
{{ else }} | |
{{ $markdown }} | |
{{ end }} |
View gist:61723a8c8e2813476a6ea3e359867773
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smtp | |
authentication | |
TLS 1.2 encryption |
NewerOlder