Skip to content

Instantly share code, notes, and snippets.

@wpscholar
wpscholar / create-admin-user.php
Last active October 20, 2024 19:54
Create a new admin user in WordPress via code. Drop this file in the mu-plugins directory and update the variables, then load a page in WordPress to create the user. Remove the file when done.
<?php
add_action( 'init', function () {
$username = 'admin';
$password = 'password';
$email_address = '[email protected]';
if ( ! username_exists( $username ) ) {
$user_id = wp_create_user( $username, $password, $email_address );
@LucaCappelletti94
LucaCappelletti94 / Sublime Text on Steroids.md
Last active November 17, 2023 19:23
A quick guide to get a super sublime text

Sublime Text on Steroids 💪

Getting Sublime

Sublime Text is an awesome text editor. You can get it either from its website or, if you are on a mac, by running the following:

brew cask install sublime-text

Package Control

Now you need Package Control, that you can either install via the command they offer on their website or, if you have an updated version of Sublime Text, you should find an option to install it under "Tools".

@black-dragon74
black-dragon74 / FixLoveGreenPencilsMalware.sh
Created December 2, 2020 21:04
Fixes love green pencils wordpress malware
#!/bin/bash
# Regex to fix DB is: "s/<script[\s\S]*?>[\s\S]*?<\/script>//g"
totalInfections=0
filesProcessed=0
echo "Welcome to lovegreenpencils malware fixer by black-dragon74"
echo "This fix is divided into 3 phases."
echo "Phase 1 fixes the \`beckup\` files."
@abhishtagatya
abhishtagatya / autoclip.py
Last active October 27, 2024 02:45
Automation Script to Edit Videos for TikTok using Python
# _____ _ _____ _ _
# | _ |_ _| |_ ___| | |_|___
# | | | | _| . | --| | | . |
# |__|__|___|_| |___|_____|_|_| _|
# |_|
#
# By Abhishta (github.com/abhishtagatya)
# pip install gTTs
# pip install moviepy