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
@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
@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' );
@secfb
secfb / pasties.md
Created March 21, 2020 14:09
pasties.md
       __________  _____    ____________________.______________ _________
       \______   \/  _  \  /   _____/\__    ___/|   \_   _____//   _____/
        |     ___/  /_\  \ \_____  \   |    |   |   ||    __)_ \_____  \ 
        |    |  /    |    \/        \  |    |   |   ||        \/        \
        |____|  \____|__  /_______  /  |____|   |___/_______  /_______  /
                        \/        \/                        \/        \/ 

Pasties

@rubo77
rubo77 / rotatescreen.sh
Last active August 1, 2023 17:16
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
@nfsarmento
nfsarmento / nginx-wordpress.conf
Last active May 3, 2024 12:07
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;
}
@igorbenic
igorbenic / elementor-widget.php
Last active April 11, 2024 09:12
Ultimate Guide for JavaScript in Elementor Widgets
<?php
/**
* Plugin Name: Elementor Widget
* Text Domain: elementor-widget
* Domain Path: /languages
* Version: 0.1.0
*
* @package Elementor_Widget
*/
@fnky
fnky / stripe-keys-and-ids.tsv
Last active March 29, 2024 22:52
Stripe keys and IDs
Prefix Description Notes
ac_ Platform Client ID Identifier for an auth code/client id.
acct_ Account ID Identifier for an Account object.
aliacc_ Alipay Account ID Identifier for an Alipay account.
ba_ Bank Account ID Identifier for a Bank Account object.
btok_ Bank Token ID Identifier for a Bank Token object.
card_ Card ID Identifier for a Card object.
cbtxn_ Customer Balance Transaction ID Identifier for a Customer Balance Transaction object.
ch_ Charge ID Identifier for a Charge object.
cn_ Credit Note ID Identifier for a Credit Note object.
@riipandi
riipandi / wireguard-ubuntu.sh
Last active September 4, 2023 15:08
Wireguard VPN Setup
#!/bin/bash
if [[ $EUID -ne 0 ]]; then echo 'This script must be run as root' ; exit 1 ; fi
[ -z $ROOTDIR ] && PWD=$(dirname $(dirname $(readlink -f $0))) || PWD=$ROOTDIR
source "$PWD/setup.sh"
# --------------------------------------------------------------------------------------------------
# Install and configure WireGuard server
# --------------------------------------------------------------------------------------------------
LC_ALL=C.UTF-8 add-apt-repository -y ppa:wireguard/wireguard && apt -y full-upgrade
apt -y install linux-headers-$(uname -r) wireguard iptables resolvconf qrencode gpw
@RomelSan
RomelSan / RouterOS 6 Syntax.xml
Last active January 27, 2024 16:00
Mikrotik RouterOS Syntax for Notepad++
<NotepadPlus>
<UserLang name="RouterOS" ext="rsc" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="yes" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 01 02 03 04</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@noobh4x
noobh4x / dns-recon.sh
Last active January 20, 2024 15:11
Automated DNS enumeration. Cloudflare section is funky.. working on it..
#!/bin/bash
if [[ -z "`which jq 2>/dev/null`" ]];
then
echo '[!!] Error: jq is required to continue'
fi
if [[ -z "`which amass 2>/dev/null`" ]];
then
echo '[!!] Error: amass is required to continue'