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

<?php
/* Adds a shortcode for displaying GitHub Gists */
function create_github_gist($atts) {
extract(shortcode_atts(array(
'source' => "https://gist.github.com/SufferMyJoy/9397075",
), $atts));
return '<script src="' . esc_attr( $source ) . '.js"></script>';
}
function seoslides_pre_user_query( $query ) {
if( 'DateRegistered' == $query->query_vars['orderby'] ) { // echo 'thus far';
$query->query_from .= " LEFT JOIN wp_usermeta m ON (wp_users.ID = m.user_id AND m.meta_key = 'user_registered')";
$query->query_orderby = "ORDER BY m.meta_value " . $query->query_vars['order'];
}
}
// add_action( 'pre_user_query', 'seoslides_pre_user_query' );
function seoslides_manage_users_columns( $columns ) {
<?php
//suppose this is the _doing_it_wrong custom column
add_filter('manage_users_columns', 'pippin_add_user_id_column');
function pippin_add_user_id_column($columns) {
$columns['pippen_id'] = 'Pippen ID';
return $columns;
}
add_filter('manage_users_custom_column', 'pippin_show_user_id_column_content', 10, 3);
function pippin_show_user_id_column_content($value, $column_name, $user_id) {
@trepmal
trepmal / post stuff
Created December 11, 2012 00:59 — forked from anonymous/post stuff
WordPress post action
add_action( 'edit_post', 'json_dump', 10, 2 );
function json_dump( $post_id, $post ) {
$posttype = get_post_type( $post );
// http://codex.wordpress.org/WordPress_Coding_Standards#Yoda_Conditions
if ( 'tree' == $posttype ) {
exec('/home/fufnet/treeupdater > log.txt');
}