Skip to content

Instantly share code, notes, and snippets.

View mitchellurgero's full-sized avatar

Mitchell Urgero mitchellurgero

View GitHub Profile
@mitchellurgero
mitchellurgero / GS_Follow_Friends.php
Created July 17, 2017 23:19
Follow another user's friends list using GS API (Will not work with Mastodon friends)
<?php
/*
By Mitchell Urgero (@stitchxd@p2px.me)
Mass follower using a friends.json list. Based off of https://gitlab.com/snippets/12852
(Looks like the api will only grab 201 "friends" at a time.... shame really...)
*/
$user = "user";
$pass = "P@ssW0Rd";
$api = "https://example.com/api";
@mitchellurgero
mitchellurgero / schema_check_old_notice.php
Created April 5, 2017 14:27
PHP7 script for GNU Social that deletes older posts (3 months)
<?php
//Originally from https://ghostbin.com/paste/xjeud by https://social.freedombone.net/bob
//Re-writen to use PHP7.x MySQLi functions as mysql_*() are REMOVED in php7.0
// gnusocial post expiry script, based on StatExpire by Tony Baldwin
// https://github.com/tonybaldwin/statexpire
//Make sure to check and/or change these options
$howfarback="-3 months"; //Check http://php.net/manual/en/function.strtotime.php for syntax
$server="localhost";