Skip to content

Instantly share code, notes, and snippets.

View sitedata's full-sized avatar
🎯
Focusing

Larry Johnson sitedata

🎯
Focusing
View GitHub Profile
@sitedata
sitedata / domtokenlist_feature_detection.js
Created July 29, 2019 19:19 — forked from igrigorik/domtokenlist_feature_detection.js
DOMTokenList supports() example for Preload
var DOMTokenListSupports = function(tokenList, token) {
if (!tokenList || !tokenList.supports) {
return;
}
try {
return tokenList.supports(token);
} catch (e) {
if (e instanceof TypeError) {
console.log("The DOMTokenList doesn't have a supported tokens list");
} else {
{
"type": "object",
"properties": {
"domains": {
"type": "array",
"items": {
"$ref": "#/definitions/OrderItem"
}
},
"payment": {
@sitedata
sitedata / Solusvm_kvm_migration_2-minute_outage.sh
Created September 25, 2019 19:38 — forked from drolfe/Solusvm_kvm_migration_2-minute_outage.sh
Solusvm kvm migration 2-minute outage
#New host
#Create a bank LV the same size as the source
lvcreate -L 400G -n kvm133_img vm_vg
#Old Host
#Creat a snapshot to stop any new data being written to the 400G LV, All changes get written to the snap lv now
lvcreate --snapshot -L10G -n kvm133-snap /dev/4tb_raid_vg/kvm133_img
@sitedata
sitedata / temporary-email-address-domains
Created November 28, 2019 03:51 — forked from adamloving/temporary-email-address-domains
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
@sitedata
sitedata / ezopenvpn.sh
Created March 30, 2020 13:14
OpenVPN Installer Script for Debian/Ubuntu
#!/bin/bash
# OpenVPN road warrior installer for Debian-based distros
# This script will only work on Debian-based systems. It isn't bulletproof but
# it will probably work if you simply want to setup a VPN on your Debian/Ubuntu
# VPS. It has been designed to be as unobtrusive and universal as possible.
if [ $USER != 'root' ]; then
echo "Sorry, you need to run this as root"
<script src="https://gist.github.com/sitedata/d98ca60eb1b9ec101c1d169b211dbd9d.js"></script>
@sitedata
sitedata / supermicro-ipmi-mac-address.md
Created May 3, 2020 08:49 — forked from DavidWittman/supermicro-ipmi-mac-address.md
Pull the LAN1/eth0 MAC address from SuperMicro IPMI

You can find the MAC address for LAN1/eth0 (not the BMC MAC) via the SuperMicro IPMI interface by running the following command:

$ ipmitool -U $IPMI_USER -P $IPMI_PASS -H $IPMI_HOST raw 0x30 0x21 | tail -c 18

The eth0 MAC address will be output in this format:

00 25 90 f0 be ef
@sitedata
sitedata / supermicro-ipmi-mac-address.md
Created May 3, 2020 08:49 — forked from DavidWittman/supermicro-ipmi-mac-address.md
Pull the LAN1/eth0 MAC address from SuperMicro IPMI

You can find the MAC address for LAN1/eth0 (not the BMC MAC) via the SuperMicro IPMI interface by running the following command:

$ ipmitool -U $IPMI_USER -P $IPMI_PASS -H $IPMI_HOST raw 0x30 0x21 | tail -c 18

The eth0 MAC address will be output in this format:

00 25 90 f0 be ef
@sitedata
sitedata / gist:c1682a2d8071f5b2c35ed547e12272a7
Created April 14, 2021 02:07
blog.sitedata.org/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# set some environment variables depending on host
RewriteRule .* - [E=ENVIRONMENT:prod]
RewriteCond %{HTTP_HOST} ^sitedata.org [NC]
RewriteRule .* - [E=ENVIRONMENT:prod]
RewriteCond %{HTTP_HOST} ^blog.sitedata.org [NC]
RewriteRule .* - [E=ENVIRONMENT:dev]
@sitedata
sitedata / .htaccess
Created April 14, 2021 05:07 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/