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 / monerod.service
Last active October 12, 2022 11:14 — forked from mariodian/monerod.service
Monero Full Node systemd script
[Unit]
Description=Monero Full Node
After=network.target
[Service]
User=sitedata
Group=sitedata
Type=forking
PIDFile=/home/sitedata/.bitmonero/monerod.pid
@sitedata
sitedata / gist:5cb0db40e4465c854a5274b136db410f
Created August 24, 2022 20:21 — forked from spudbean/gist:1558257
Look of disapproval and other emoticons
ಠ_ಠ
( ͡° ͜ʖ ͡°)
¯\_(ツ)_/¯
(╯°□°)╯︵ ┻━┻
http://www.fileformat.info/convert/text/upside-down.htm
WRTTN http://wrttn.me/30dbfd/
Unicode Emoticons
@sitedata
sitedata / dhcpd.conf
Created July 7, 2022 20:24 — forked from NiKiZe/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 / SplClassLoader.php
Created July 7, 2022 19:18 — forked from jwage/SplClassLoader.php
Add MIT license.
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
@sitedata
sitedata / start.sh
Created June 30, 2022 21:44 — forked from NiKiZe/start.sh
Filter and route on hostname using SNI
#!/bin/bash
# Filter and route on hostname using SNI
# https://github.com/Lochnair/xt_tls/issues/52
# This creates iptables rules and ip rules to filter and route HTTPS traffic based on hostname in SNI field
# Some links on why packets might be droped, see rp_filter below
# https://serverfault.com/questions/934848/ip-rule-to-works-but-ip-rule-fwmark-fails-why
# https://serverfault.com/questions/932205/advanced-routing-with-firewall-marks-and-rp-filter
# https://serverfault.com/questions/816393/disabling-rp-filter-on-one-interface
@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