Skip to content

Instantly share code, notes, and snippets.

@trepmal
trepmal / delet_tweets.md
Last active August 13, 2025 00:03 — 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

<?php
$allowed_tokens = [
];
if ( ! in_array( $_POST['token'], $allowed_tokens, true ) ) {
die('forbidden');
}
$query = $_POST['text'];
<?php
if ( isset( $argv[1] ) ) {
$query = $argv[1];
} else {
$allowed_tokens = [
];
if ( ! in_array( $_POST['token'], $allowed_tokens ) ) {
die;
}
@trepmal
trepmal / remote-login.php
Created June 21, 2012 20:49
[WordPress Plugin] Remote Login
<?php
/*
Plugin Name: Remote Login
Description: Log into the site with creds that work on remote site (as defined in plugin). The remote site must have XML-RPC enabled.
Author: Kailey Lampert
Author URI: http://kaileylampert.com/
THIS IS NOT COMPLETE - DO NOT USE IN PRODUCTION
The remote site (defined below in $server) is the "master" site.
<?php
/*
* Plugin Name: Category Home Page
* Plugin URI: trepmal.com
* Description:
* Version:
* Author: Kailey Lampert
* Author URI: kaileylampert.com
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
@trepmal
trepmal / change-network-admin-color-scheme.php
Last active September 5, 2024 01:45
Swap the Color Scheme between regular and Network admins. For WP3.8 (and beyond, probably)
<?php
// Plugin Name: Change Network Admin Color Scheme
if ( is_multisite() ) {
add_filter( 'style_loader_src', 'cnacs_intercept_admin_color', 10, 2 );
add_action( 'admin_color_scheme_picker', 'cnacs_network_admin_color_scheme_picker');
add_action( 'personal_options_update', 'cnacs_update_network_admin_option' );
add_action( 'edit_user_profile_update', 'cnacs_update_network_admin_option' );
}
@trepmal
trepmal / feelings.php
Created August 30, 2013 05:34
Demo code for hiding custom meta with an underscore prefix
<?php
/*
* Plugin Name: Feelings
* Plugin URI: trepmal.com
* Description: Add your feelings to your post
* Version: 0.1
* Author: Kailey Lampert
* Author URI: kaileylampert.com
* License: GPLv2 or later
* License URI: http://www.gnu.org/licenses/gpl-2.0.html
@trepmal
trepmal / escape-widgets-test.php
Last active September 5, 2024 01:39
See how many widgets are not escaping properly.
<?php
add_filter( 'widget_display_callback', 'exploit_widget_display_callback', 10, 3 );
function exploit_widget_display_callback( $instance, $widget_obj, $args ) {
foreach( $instance as $k => $v )
$instance[ $k ] .= '<script>alert("'.esc_js( $widget_obj->name ." \n". $widget_obj->id ) .'");</script>';
return $instance;
}
@trepmal
trepmal / miniloops-ajax-paging.php
Created March 2, 2013 23:33
Mini Loops Ajax Paging
<?php
// Plugin Name: Mini Loops Ajax Paging
// Description: Enables ajax paging in widget.
// Version: 2013.03.02
// Author: Kailey Lampert
// Author URI: kaileylampert.com
add_action( 'init', 'miniloops_ajax_paging_init' );
function miniloops_ajax_paging_init() {
if ( ! function_exists( 'miniloops' ) ) return;
@trepmal
trepmal / miniloops-multisite.php
Created March 2, 2013 20:10
Mini Loops for Multisite
<?php
// Plugin Name: Mini Loops for Multisite
// Description: Adds a 'blog id' field so you can get and display posts from other sites on the same network. Subject to limitations of switch_to_blog. Must be a Super Admin to see the option.
// Version: 2013.03.02
// Author: Kailey Lampert
// Author URI: kaileylampert.com
add_action( 'init', 'miniloops_multisite_init' );
function miniloops_multisite_init() {
// bail if no Mini Loops, not MS, or user isn't Super Admin