Skip to content

Instantly share code, notes, and snippets.

View welenofsky's full-sized avatar

Justin Welenofsky welenofsky

  • Three29 / Freelance
View GitHub Profile
@welenofsky
welenofsky / restrictions.php
Created August 28, 2023 16:02
Shipping Restrictions
<?php
$shipping_restrictions = array(
'canada' => array(
'allowed_countries' => array('CA'),
),
'domestic-only' => array(
'allowed_countries' => array('US'),
),
'usa-canada' => array(
'allowed_countries' => array('US', 'CA'),
@welenofsky
welenofsky / fail2ban-wordpress.md
Created October 18, 2019 04:24
Basic Wordpress Fail2Ban Filter (Debian/Ubuntu Apache2)

Blocking WP Login brute forcing

This guide will tell you how to setup a custom fail2ban filter and jail to watch the Apache access log and ban malicious attackers who brute for wp-login.php. I am sure we have all seen it in our access logs. I would say it the most common thing I see in wordpress and non wordpress sites access logs that stands out as a blind brute force. Im tired of it. So I found out how to ban them.

Install fail2ban using apt

# apt install fail2ban

Create wordpress filter

@welenofsky
welenofsky / index.html
Created April 18, 2019 04:26
Example Vue
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
</head>
<style>