Skip to content

Instantly share code, notes, and snippets.

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

Sean cybersholt

🏠
Working from home
View GitHub Profile
@nfsarmento
nfsarmento / nginx-wordpress.conf
Last active November 2, 2025 09:45
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;
}
@rubo77
rubo77 / rotatescreen.sh
Last active April 2, 2025 08:31
This script rotates the screen (tested on a Lenovo Yoga 730-15iwl) (source: https://askubuntu.com/a/1217290/34298)
#!/bin/bash
# This script rotates the screen and touchscreen
# by Ruben Barkow-Kuder: https://gist.github.com/rubo77/daa262e0229f6e398766
#### configuration
# find your Touchscreen device with `xinput`
TouchscreenDevice="$(xrandr |grep eDP|cut -d" " -f1)"
if [ "$1" = "--help" ] || [ "$1" = "-h" ] ; then
@secfb
secfb / pasties.md
Created March 21, 2020 14:09
pasties.md
       __________  _____    ____________________.______________ _________
       \______   \/  _  \  /   _____/\__    ___/|   \_   _____//   _____/
        |     ___/  /_\  \ \_____  \   |    |   |   ||    __)_ \_____  \ 
        |    |  /    |    \/        \  |    |   |   ||        \/        \
        |____|  \____|__  /_______  /  |____|   |___/_______  /_______  /
                        \/        \/                        \/        \/ 

Pasties

@metaylimpo
metaylimpo / functions.php
Last active February 2, 2022 15:39
Example of wordpress theme function file for several optimizations
/*
DO NOT COPY\PASTE. Take only what you need carefully.
The following code is just a few **examples** of optimizations that you can do in functions.php file.
*/
<?php
// disable google fonts
add_filter( 'elementor/frontend/print_google_fonts', '__return_false' );
@michaelrinderle
michaelrinderle / OpenCanaryLogParser.py
Last active January 13, 2024 09:29
Python script to parse OpenCanary log file with broken JSON structure
import json
import socket
CANARY_FILE = "opencanary.log"
INFORMATION_LOG = 1001
BRUTE_FORCE_LOG = 6001
PORT_SCAN_LOG = 5001
HTTP_SCAN_LOG = 3000
@isaumya
isaumya / remove-woocommerce-bloat-marketing-hub.md
Last active March 1, 2025 15:05
Easily Remove WooCommerce Bloated Features like Marketing Hub from WordPress Admin Menu

Remove WooCommerce Bloated Features from WP Admin Menu

Recently WooCommerce has added a lot of improvements to the plugin which we really appriciate but at the same time a lot of bloated features has alos been added to the plugin like Marketing Hub, a completely useless menu taking extra space among the other important menu items. Now if you find Marketing Hub to be useful, you can keep it.

But just in case you are looking for a way to remove these features that you no longer need from your WordPress Admin menus, take a look at the following code snippets. Please note: though I will show you how you can remove the Marketing Hub from your WP Admin menu list completely and make sure WooCommerce doesn't execute codes for that feature you don't need, you can do the same for other WooCommerce features as well like Analytics.

How to remove Marketing Hub for WooCommerce <= v4.2

If you are using WooCommerce <= v4.2, you can simple add this one line of code in your theme's functions.php f

@kiwi-cam
kiwi-cam / personFinder.sh
Last active November 16, 2023 22:24
Using WyzeCam Hacks (https://github.com/HclX/WyzeHacks) with Azure Vision API and rclone for Uploads
#!/bin/bash
####### Configuration #####
# Azure Setup: https://docs.microsoft.com/en-us/azure/cognitive-services/cognitive-services-apis-create-account?tabs=multiservice%2Cwindows
AzureSubscriptionKey=""
AzureEndpoint=""
# IFTTT Setup: https://ifttt.com/maker_webhooks
IFTTTKey=""
IFTTTEventName=""
@jjmartres
jjmartres / how-to-reduce-size-of-docker-data-volume-in-docker-desktop-for-windows-v2.md
Last active May 14, 2025 08:23
How to reduce size of docker data volume in Docker Desktop for Windows v2

How to reduce size of docker data volume in Docker Desktop for Windows v2

Docker Desktop for Windows v2, which uses WSL2, stores all image and container files in a separate virtual volume (vhdx). This virtual hard disk file can automatically grow when it needs more space (to a certain limit). Unfortunately, if you reclaim some space, i.e. by removing unused images, vhdx doesn't shrink automatically.

Optimize

wsl --shutdown
Optimize-VHD -Path "$($env:LOCALAPPDATA)\Docker\wsl\data\ext4.vhdx" -Mode Full
@cdeck3r
cdeck3r / HoneyPiZeroW.md
Last active August 20, 2025 01:48
Setup of low interaction honeypot on a Raspberry Pi Zero W
@alkampfergit
alkampfergit / WingetUpgrade.ps1
Last active November 25, 2024 17:46
Upgrade with Winget being able to select list of software to skip
class Software {
[string]$Name
[string]$Id
[string]$Version
[string]$AvailableVersion
}
$upgradeResult = winget upgrade | Out-String
$lines = $upgradeResult.Split([Environment]::NewLine)