Skip to content

Instantly share code, notes, and snippets.

Avatar

Levi Durfee levidurfee

View GitHub Profile
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:

@levidurfee
levidurfee / material-design-shadows.css
Created Sep 10, 2018 — forked from serglo/material-design-shadows.css
Google material design elevation system shadows as css. Based on https://material.io/design/environment/elevation.html#default-elevations Exported with Sketchapp from the Google material design theme editor plugin "Baseline" theme.
View material-design-shadows.css
.boxshadow-none { box-shadow: none; }
.boxshadow-1dp { box-shadow: 0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.20); }
.boxshadow-2dp { box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.20); }
.boxshadow-3dp { box-shadow: 0 3px 4px 0 rgba(0,0,0,0.14), 0 3px 3px -2px rgba(0,0,0,0.12), 0 1px 8px 0 rgba(0,0,0,0.20); }
.boxshadow-4dp { box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.20); }
.boxshadow-6dp { box-shadow: 0 6px 10px 0 rgba(0,0,0,0.14), 0 1px 18px 0 rgba(0,0,0,0.12), 0 3px 5px -1px rgba(0,0,0,0.20); }
.boxshadow-8dp { box-shadow: 0 8px 10px 1px rgba(0,0,0,0.14), 0 3px 14px 2px rgba(0,0,0,0.12), 0 5px 5px -3px rgba(0,0,0,0.20); }
.boxshadow-9dp { box-shadow: 0 9px 12px 1px rgba(0,0,0,0.14), 0 3px 16px 2px rgba(0,0,0,0.12), 0 5px 6px -3px rgba(0,0,0,0.20); }
.boxshadow-12dp { box-shadow: 0 12px 17px 2px rgba(0,0,0,0.14), 0 5px 22px 4px rgba(0,0,0,0.12), 0 7px