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 / 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

@iamsajidjaved
iamsajidjaved / README.txt
Created May 2, 2021 19:50
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.1+commit.df193b15.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
@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 / 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