Skip to content

Instantly share code, notes, and snippets.

View iamsajidjaved's full-sized avatar
🏠
Working from home

Sajid Javed iamsajidjaved

🏠
Working from home
View GitHub Profile
@iamsajidjaved
iamsajidjaved / README.md
Created December 11, 2019 03:29 — forked from dalezak/README.md
Ionic Capacitor Resources Generator
  1. Run npm install cordova-res --save-dev
  2. Create 1024x1024px icon at resources/icon.png
  3. Create 2732x2732px splash at resources/splash.png
  4. Add "resources": "cordova-res ios && cordova-res android && node scripts/resources.js" to scripts in package.json
  5. Copy resources.js file to scripts/resources.js
  6. Run sudo chmod -R 777 scripts/resources.js
  7. Run npm run resources
@iamsajidjaved
iamsajidjaved / AppServiceProvider.php
Created December 12, 2019 07:04 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@iamsajidjaved
iamsajidjaved / fail2ban-wordpress.md
Last active June 30, 2022 12:59 — forked from welenofsky/fail2ban-wordpress.md
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-get"

# sudo apt-get install fail2ban

Create wordpress filter