Skip to content

Instantly share code, notes, and snippets.

View trepmal's full-sized avatar
🍪

Kailey Lampert trepmal

🍪
View GitHub Profile
@trepmal
trepmal / delet_tweets.md
Last active September 24, 2023 08:15 — forked from apsun/delet_tweets.md
Delete your old tweets with this disgusting bash script

100% free. Runs completely locally on your machine. Bypasses the 3200 tweet limit. May require some eye bleach for the script. Here's how to use it:

  1. Go to settings -> account -> your Twitter data and request a download. This may take a few hours. You'll get an email with a link to download a zip file. Extract the zip file and navigate to the data directory.

  2. Go to Twitter in a web browser and find any Tweet you want to delete. We're going to use it to extract your authentication credentials for the next step. Open developer tools, delete the tweet, and find the request

@trepmal
trepmal / sunrise.php
Created November 26, 2020 22:19
Testing scenarios for domain masking via sunrise.php in WordPress
<?php
// Mask Domain testing
$clientslug_custom_sunrise_domains = [
'mask.test',
];
// quickly switch testing scenarios
#!/bin/bash
echo "post_id,post_title,image_path";
while read -r post_row
do
# --format=csv always has a header
if [[ "ID,post_title" == $post_row ]]; then
continue;
#!/bin/bash
convert='/usr/local/bin/convert'
# flight check: must have imagemagick
if [ ! $(which $convert) ]; then
echo 'Error: `convert` required'
exit;
fi;
#!/bin/bash
#
# Call this file with the URL to test for as the only param
# `bash testurl.sh ms.test/doesthissiteexist`
#
# This script also assumes the multisite you're looking in is at /srv/www/ms
#
colorreset="\033[0;0m"
@trepmal
trepmal / gifintensifier.sh
Last active September 27, 2021 21:01
intensify your emojis
#!/bin/bash
#
# Call this script, passing an image filename
# Creates an intensified version
convert='/usr/local/bin/convert'
realpath='/usr/local/bin/realpath'
# flight check: must have imagemagick
if [ ! $(which $convert) ]; then
# Find your files in /tmp older than 7 days
find /tmp -mtime +7 -user `whoami` -exec ls -lpdh {} \; | column -t
# Delete your files in /tmp older than 7 days
find /tmp -type f -mtime +7 -user `whoami` -delete
find /tmp -type d -mtime +7 -user `whoami` -empty -delete
# Find your files in /home (2 dirs deep) older than 7 days
find /home -maxdepth 2 -mtime +7 -user `whoami` -exec ls -lpdh {} \; | column -t
<?php
// Plugin Name: WLO Widget
// register core 'text' widget
register_wlo_widget( 'text' ); // id base
/**
* hook in
*/
function register_wlo_widget( $widget_id ) {
<?php
if ( !defined( 'WP_CLI' ) ) return;
/**
*/
class trepmal_cURL_REST extends WP_CLI_Command {
/**
* Generate cURL command for REST API
@trepmal
trepmal / debug-rest-api.php
Last active March 1, 2018 22:38
Intended for use alongside Debug Bar tools. Do not use in Production.
<?php
/**
* Plugin Name: Debug Bar for REST API
* Description: Enable Debug Bar for REST API endpoints (add ?debug). Not for production.
* Author: Kailey "trepmal" Lampert
*/
namespace trepmal\rest_debug;
/**