diff --git a/_posts/2019-01-30-removing-masto-usernames-from-postgresql.md b/_posts/2019-01-30-removing-masto-usernames-from-postgresql.md new file mode 100644 index 0000000..160bdff --- /dev/null +++ b/_posts/2019-01-30-removing-masto-usernames-from-postgresql.md @@ -0,0 +1,23 @@ +--- +layout: post +title: Removing Masto usernames from PostgreSQL +subtitle: Give a Mastodonian their handle back +description: Give a Mastodonian their handle back +cover: /assets/posts/mastodon.png +date: 2019-01-30 13:16 -0500 +--- +The other day, I had a friend of mine create an account on [my Mastodon instance](https://masto.nixnet.xyz/). I made him an admin account thinking I'd have the _ability_ to demote him if I needed to only to find that I couldn't. So I had him delete his account thinking that he'd be able to remake it with the same username only to find that he couldn't. This is the username he uses everywhere (like me with Amolith) so I wanted to get it back for him. I did some digging and found that I would have to delete the handle from Masto's PostgreSQL database. I'd never used postgres before so it was very new; a rundown of the basic commands is below along with the one I used to delete his username at the end. + +***NOTE:*** I don't know how this will affect your instance if the user had toots before they deleted their account. Handles federate from instance to instance and things could very well break if another instance had the user's information already. Thankfully, my friend was busy that day and hadn't even started configuring his account, much less tooted anything. + +# PostgreSQL Syntax +`\l` - list databases +`\c ` - change databases +`\d` - list tables +`\d+ ` - list columns in the specified table +`select from
;` - show the entries in the specified column +`delete from
where = '';` - delete the username + +The command sequence I used was: +`\c mastodon` +`delete from accounts where username='';` diff --git a/assets/posts/mastodon.png b/assets/posts/mastodon.png new file mode 100644 index 0000000..bc2aa7f Binary files /dev/null and b/assets/posts/mastodon.png differ diff --git a/assets/svgs/mastodon.svg b/assets/svgs/mastodon.svg new file mode 100644 index 0000000..b2e2a48 --- /dev/null +++ b/assets/svgs/mastodon.svg @@ -0,0 +1,93 @@ + + + + + + + Alternate Shield + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/friends.md b/friends.md index e56efb7..ec8daf7 100644 --- a/friends.md +++ b/friends.md @@ -1,7 +1,7 @@ --- layout: page -title: Friends -subtitle: Friends of NixNet +title: Friends of NixNet +subtitle: A list of some like-minded people and their websites description: A list of some like-minded people and their websites cover: /assets/pages/friends.png permalink: /friends/ @@ -9,7 +9,9 @@ permalink: /friends/ ## People * [Elias Ojala](https://lelux.fi/) - really cool guy who hosts some services like I do * [Anxhelo Lushka](https://lushka.al/) - graphic designer, frontend developer, computer engineering student and heavy open source user/advocate. Has an interesting blog. +* [Luke Smith](http://lukesmith.xyz/) - makes technology videos on YouTube, is the Luke of [Luke's Auto-Rice Bootstrapping Scripts (LARBS)](https://larbs.xyz/), and does a podcast called _Not Related_ on "Big-Braned" topics ## Organisations * [LibreHo.st](https://libreho.st/) - a network of average people who host FLOSS services available for anyone to use * [Snopyta.org](https://snopyta.org/) - Snopyta provides online services based on freedom, privacy and decentralization. Part of LibreHosters +* [CYGONetwork.com](https://cygonetwork.com) - alternative to Facebook. Better features, better community, and enhanced privacy/security