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 / bookmarklets-history.md
Created March 7, 2024 21:03 — forked from RadLikeWhoa/bookmarklets-history.md
A history of the networks added to the bookmarklets list.

January 14, 2013

News

  • Google Reader
  • Instapaper
  • Pinboard
  • Pocket
  • Readability
  • Storify
@sitedata
sitedata / l.php
Created October 28, 2023 01:30 — forked from adriengibrat/l.php
Extreme minification of shortest possible PSR-0 compliant autoloader, 5 lines !
<?php
//set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__); // optional
spl_autoload_register(function ($class) {
$file = preg_replace('#\\\|_(?!.+\\\)#','/', $class) . '.php';
if (stream_resolve_include_path($file))
require $file;
});
@sitedata
sitedata / kickstart-ubuntu-docker-mongodb.sh
Created November 17, 2022 11:57 — forked from aedm/kickstart-ubuntu-docker-mongodb.sh
Installs Docker & Nginx on Ubuntu 16.04, starts MongoDB container
#!/bin/sh
# curl {URL to this script} | sh -s
# install docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker
#!/usr/bin/env bash -x
# Creates RAM disk.
#
# SYNOPSIS
# create_ramdisk [size [label]]
#
# OPTIONS
# size: RAM disk size in megabytes. Default: 1024
# label: RAM disk volume label. Default: UUID
@sitedata
sitedata / btcpayserver.service
Last active October 12, 2022 11:28 — forked from mariodian/btcpayserver.service
BTCPayServer Systemd Service
[Unit]
Description=BtcPayServer daemon
Requires=btcpayserver.service
After=nbxplorer.service
[Service]
ExecStart=/usr/bin/dotnet run --no-launch-profile --no-build -c Release -p "/home/sitedata/source/btcpayserver/BTCPayServer/BTCPayServer.csproj" -- $@
User=sitedata
Group=sitedata
Type=simple
@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