Skip to content

Instantly share code, notes, and snippets.

View levidurfee's full-sized avatar

Levi Durfee levidurfee

View GitHub Profile
@levidurfee
levidurfee / sources.list
Created January 29, 2024 13:43
Debian Bookworm Sources
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
@levidurfee
levidurfee / 1-farmer_api.py.patch
Last active July 13, 2021 12:32
Chia Harvester API log iterations patch
--- chia/farmer/farmer_api.py.orig 2021-07-13 12:30:09.737585015 +0000
+++ chia/farmer/farmer_api.py 2021-07-13 11:14:13.613493604 +0000
@@ -83,7 +83,10 @@
new_proof_of_space.sp_hash,
)
+
+ lmd_sp_interval_iters = calculate_sp_interval_iters(self.farmer.constants, sp.sub_slot_iters)
# If the iters are good enough to make a block, proceed with the block making flow
+ self.farmer.log.info(f"lmd Iterations, Required: {required_iters} SP: {lmd_sp_interval_iters}")

Keybase proof

I hereby claim:

  • I am levidurfee on github.
  • I am levidurfee (https://keybase.io/levidurfee) on keybase.
  • I have a public key whose fingerprint is F190 6FF1 B505 7745 5F97 A374 7F7D F809 DE28 1801

To claim this, I am signing this object:

@levidurfee
levidurfee / myservice.service
Created March 24, 2021 19:05
systemd service file
# https://wiki.debian.org/systemd/Services
# Contents of /etc/systemd/system/myservice.service
[Unit]
Description=My Service
After=network.target
[Service]
Type=simple
Restart=always
ExecStart=/usr/local/bin/myservice
@levidurfee
levidurfee / install.sh
Last active December 31, 2023 18:54
crowdsec firewall bouncer nftables
wget https://github.com/crowdsecurity/crowdsec/releases/download/v1.0.7/crowdsec-release.tgz
tar -xf crowdsec-release.tgz
cd crowdsec-v1.0.7
./wizard.sh -i
apt install nftables -y
wget https://github.com/crowdsecurity/cs-firewall-bouncer/releases/download/v0.0.10/cs-firewall-bouncer.tgz
tar -xf cs-firewall-bouncer.tgz
cd cs-firewall-bouncer-v0.0.10
@levidurfee
levidurfee / ee-261-search_model.php.patch
Last active May 26, 2021 18:32
ExpressionEngine 2 incompatibility with MySQL 5.7.x
--- b.php 2021-05-26 14:28:40.650179782 -0400
+++ a.php 2021-05-26 14:28:35.346193549 -0400
@@ -436,20 +436,24 @@
if ($key == 'channel_name')
{
$this->db->order_by('FIELD(channel_id, '.$channel_name_order.')', NULL, FALSE);
+ $this->db->select('channel_id');
}
elseif ($key == 'screen_name')
{
@levidurfee
levidurfee / index.html
Created November 29, 2020 01:07
meta tags
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>website</title>
<meta property="og:type" content="">
<meta property="og:title" content="">
@levidurfee
levidurfee / rule-1-for-ajax.txt
Created May 5, 2019 20:09
Cloudflare Firewall Rule to Protect WP
if http.request.uri.path contains "/wp-admin/admin-ajax.php"
@levidurfee
levidurfee / rule-2.txt
Created May 4, 2019 16:10
Cloudflare Firewall Rule to Protect WP
http.request.uri.path contains "/wp-login.php"
or
http.request.uri.path contains "/wp-admin"
@levidurfee
levidurfee / rule-1.txt
Last active May 4, 2019 16:09
Cloudflare Firewall Rules to protect Wordpress
(
ip.src in {2601:2d2:1234:1100::/64}
)
and
(
http.request.uri.path contains "/wp-login.php"
or
http.request.uri.path contains "/wp-admin"
)