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 / backup.sh
Created June 30, 2022 21:44 — forked from NiKiZe/backup.sh
Linux system backup
# from https://wiki.archlinux.org/title/Full_system_backup_with_tar
# -p, --acls and --xattrs store all permissions, ACLs and extended attributes.
# Without both of these, many programs will stop working!
# It is safe to remove the verbose (-v) flag. If you are using a
# slow terminal, this can greatly speed up the backup process.
#--exclude-from=$exclude_file
tar --exclude=/tmp/* --exclude=/var/tmp/* --exclude=/usr/portage/* --acls --xattrs --one-file-system -cpvf - . | xz -zvv -T3 -0 > file.xz
restore:
xz | tar --acls --xattrs --numeric-owner -xpf -
@sitedata
sitedata / dnsmasq.conf
Created June 30, 2022 21:43 — forked from NiKiZe/dnsmasq.conf
Trying to chainload iPXE with full feature set from a lesser featured one. dnsmasq ProxyDHCP edition
# Known working dnsmasq version 2.85 config for iPXE proxydhcp usage
# things to replace:
# * 10.1.1.0 - your subnet
# * eth0 - interface to listen on, or switch to bind-dynamic
# * 10.1.1.2 - your tftp server ip
# * http://gentoo.ipxe.se/boot.ipxe - script to run once inside iPXE
# Debug logging
log-debug
@sitedata
sitedata / dhcpd.conf
Created June 30, 2022 21:43 — forked from robinsmidsrod/dhcpd.conf
Trying to chainload iPXE with full feature set from a lesser featured one, whilst still being able to boot non-supported cards with UNDI
ddns-update-style none;
deny bootp; #default
authoritative;
include "/etc/dhcp/ipxe-option-space.conf";
# GREEN (private network)
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.100 10.1.1.199;
option subnet-mask 255.255.255.0;
@sitedata
sitedata / dbt2.sh
Created April 29, 2022 05:23 — forked from BenMorel/dbt2.patch
Downloads and runs the DBT2 benchmark for MySQL.
#!/bin/sh
# Downloads and runs the DBT2 benchmark for MySQL.
# ================================================
#
# Tested with MySQL 8.0.17 - CentOS 8 - 2020-09-14
# Tested with MySQL 8.0.21 - Fedora 32 - 2020-09-14
#
# On a bare metal server, Xeon E5-1650v4 6x (12x HT) 3.60GHz, 64GB DDR4 2666, NVMe drive, with:
# - innodb_buffer_pool_size = 32GB
@sitedata
sitedata / request.txt
Created December 30, 2021 06:11 — forked from sclaeys/request.txt
Premium URL Shortener API Request
GET http://webz.cc/api?key=APIKEY&url=THELONGURLTOBESHORTENED&custom=CUSTOMALIAS
@sitedata
sitedata / rfc3161.txt
Created November 2, 2021 20:26 — forked from Manouchehri/rfc3161.txt
List of free rfc3161 servers.
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com
http://timestamp.apple.com/ts01
http://tsa.mesign.com
http://time.certum.pl
https://freetsa.org
http://timestamp.globalsign.com/scripts/timstamp.dll
http://timestamp.globalsign.com/?signature=sha2
@sitedata
sitedata / wp-google-tag-manager
Created May 13, 2021 16:47 — forked from tankbar/wp-google-tag-manager
Add Google Tag Manager in WordPress with hooks and actions
<?php
/* ADD GTM TO HEAD AND BELOW OPENING BODY */
add_action('wp_head', 'google_tag_manager_head', 20);
function google_tag_manager_head() { ?>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
@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/
@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 / 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