Skip to content

Instantly share code, notes, and snippets.

View ihfbib's full-sized avatar
🎯
Focusing

Hamada Habib ihfbib

🎯
Focusing
View GitHub Profile
@ihfbib
ihfbib / WP Security README.md
Created January 13, 2022 11:55 — forked from ericrasch/WP Security README.md
Hardening & Improving WordPress Security
@ihfbib
ihfbib / nginx-tls.conf
Created August 11, 2022 02:01 — forked from gavinhungry/nginx-tls.conf
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <gavinhungry@gmail.com>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are not included here.
#
# Additional tips:
#
@ihfbib
ihfbib / Convert Custom Taxonomy to Custom Post Type
Created September 8, 2022 23:37 — forked from Strap1/Convert Custom Taxonomy to Custom Post Type
A very hacky and quick way to transfer a Custom Taxonomy to Custom Post Type and transfer associated metadata to Custom Meta Fields. Note: You can use this if it fits your needs, but it is custom to my set up. Use in a testing environment. It's a plugin with no interface, runs on activation and depending on the amount of data, may hit PHP timeou…
<?php
/*
Plugin Name: Convert Custom Taxonomy to Custom Post Type
Plugin URI: N/A
Description: A plugin to convert a Custom Taxonomy to a Custom Post Type and transfer associated metadata.
Version: 0.1
Author: Strap1
Author URI: http:/www.hiphopinenglish.com
/** Convert Taxonomy '%name%' to CPT '%name%' **/
@ihfbib
ihfbib / nginx.conf
Created January 11, 2023 05:59 — forked from andybeak/nginx.conf
An nginx config for Wordpress #nginx #config #wordpress
# Read http://codex.wordpress.org/Nginx
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://www.queryadmin.com/854/secure-wordpress-nginx/
# http://tautt.com/best-nginx-configuration-for-security/
# https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
#
# Generate your key with: openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
# Generate certificate: sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt
@ihfbib
ihfbib / nginx-wordpress.conf
Created January 11, 2023 06:03 — forked from nfsarmento/nginx-wordpress.conf
Harden wordpress security nginx
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}
@ihfbib
ihfbib / nginx.conf
Created January 18, 2023 07:31 — forked from MaxLazar/nginx.conf
Nginx Rules to Harden WordPress Security
location ~* /xmlrpc.php$ {
allow 172.0.1.1;
deny all;
}
if ($request_method !~ ^(GET|POST)$ ) {
return 444;
}
location ~* /(?:uploads|files|wp-content|wp-includes|akismet)/.*.php$ {
@ihfbib
ihfbib / wordpress.conf
Created January 18, 2023 07:45 — forked from ilokano/wordpress.conf
nginx settings for WordPress.
# https://codex.wordpress.org/Nginx
# Global restrictions configuration file.
# Deleted config for .htaccess, robots.txt, favicon restriction
# because they are already included in the default
# domain.conf created by ispconfig
# Block PHP files in uploads, content, and includes directory.
location ~* /(?:uploads|files|wp-content|wp-includes)/.*\.php$ {
deny all;
}
@ihfbib
ihfbib / Response.php
Created February 15, 2023 20:36 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;
@ihfbib
ihfbib / City Model
Created February 21, 2023 05:06 — forked from phackwer/City Model
Laravel 5 - all cities, regions, states and countries from Gazeteer
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class City extends Model
{
/**
* @var array
site:*/sign-in
site:*/account/login
site:*/forum/ucp.php?mode=login
inurl:memberlist.php?mode=viewprofile
intitle:"EdgeOS" intext:"Please login"
inurl:user_login.php
intitle:"Web Management Login"
site:*/users/login_form
site:*/access/unauthenticated
site:account.*.*/login