Skip to content

Instantly share code, notes, and snippets.

@lkraider
lkraider / srt-fixer.py
Last active July 11, 2025 03:28
This script will adjust and fix captions created by whisperX (https://github.com/m-bain/whisperX) that generate overlapping sequential captions
import re
import sys
import json
from datetime import timedelta
# --- Helper functions for time conversion --- #
def srt_time_to_seconds(srt_time: str) -> float:
"""
Convert SRT time (HH:MM:SS,ms) to seconds.
@abhishtagatya
abhishtagatya / autoclip.py
Last active July 11, 2025 20:37
Automation Script to Edit Videos for TikTok using Python
# _____ _ _____ _ _
# | _ |_ _| |_ ___| | |_|___
# | | | | _| . | --| | | . |
# |__|__|___|_| |___|_____|_|_| _|
# |_|
#
# By Abhishta (github.com/abhishtagatya)
# pip install gTTs
# pip install moviepy
@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."
@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".

// Requires:
// Leaflet: http://leafletjs.com/
// Leaflet.curve: https://github.com/elfalem/Leaflet.curve
//
// Assumes:
// var map is a Leaflet map and already set up.
var latlngs = [];
var latlng1 = [LATITUDE, LONGTITUDE],
@wpscholar
wpscholar / create-admin-user.php
Last active January 30, 2025 17:31
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 );