Skip to content

Instantly share code, notes, and snippets.

Avatar

Levi Durfee levidurfee

View GitHub Profile
@levidurfee
levidurfee / 1-farmer_api.py.patch
Last active Jul 13, 2021
Chia Harvester API log iterations patch
View 1-farmer_api.py.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}")
View keybase.md

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:

View myservice.service
# 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 Feb 21, 2021
crowdsec firewall bouncer nftables
View install.sh
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
ExpressionEngine 2 incompatibility with MySQL 5.7.x
View ee-261-search_model.php.patch
--- 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')
{
View index.html
<!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
Cloudflare Firewall Rule to Protect WP
View rule-1-for-ajax.txt
if http.request.uri.path contains "/wp-admin/admin-ajax.php"
@levidurfee
levidurfee / rule-2.txt
Created May 4, 2019
Cloudflare Firewall Rule to Protect WP
View rule-2.txt
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
Cloudflare Firewall Rules to protect Wordpress
View rule-1.txt
(
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"
)
View keybase.md

Keybase proof

I hereby claim:

  • I am levidurfee on github.
  • I am ldurfee (https://keybase.io/ldurfee) on keybase.
  • I have a public key ASBY6qZh--demtGpauiVc3PtSY4Kya3rbc0QwfW5HNcUpAo

To claim this, I am signing this object: