Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/soatok/dunktags
Generate a hashtag for a terrible take so you can dunk on it without boosting engagement
https://github.com/soatok/dunktags
social-media twitter
Last synced: about 2 months ago
JSON representation
Generate a hashtag for a terrible take so you can dunk on it without boosting engagement
- Host: GitHub
- URL: https://github.com/soatok/dunktags
- Owner: soatok
- License: isc
- Created: 2022-01-12T06:16:25.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-05T20:11:39.000Z (12 months ago)
- Last Synced: 2024-10-10T18:56:13.931Z (2 months ago)
- Topics: social-media, twitter
- Language: TypeScript
- Homepage: https://soatok.blog/2022/01/12/dont-dunk-the-gunk/
- Size: 982 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- starred - soatok/dunktags - Generate a hashtag for a terrible take so you can dunk on it without boosting engagement (TypeScript)
README
# Dunktags
[![Linux Build Status](https://travis-ci.org/soatok/dunktags.svg?branch=master)](https://travis-ci.org/soatok/dunktags)
[![npm version](https://img.shields.io/npm/v/dunktags.svg)](https://npm.im/dunktags)Generate hashtags from the URLs of bad tweets, to coordinate dunks on the original tweet
**without** boosting said tweet's status in the Twitter Algorithm.> *[**Don't Dunk the Guunk**: How to Avoid Accidentally Amplifying Assholes on Twitter](https://soatok.blog/2022/01/12/dont-dunk-the-gunk/)*
![Just say No to bad opinions.](https://raw.githubusercontent.com/soatok/soatok/master/stickers/SoatokTelegrams2020-04.png)
## The Problem
Every once in a while, some jerk tweets something extremely stupid, immoral, incorrect, or
otherwise tempting to dunk on.For example:
![A bad tweet by a dumb organization](https://raw.githubusercontent.com/soatok/dunktags/master/docs/bad-tweet.jpg)
Whenever something like this happens, a lot of people give into the temptation to dunk on
these clowns.Unfortunately, this means that the bad tweet gets a lot of **Replies** and **Quote Tweets**.
This amplifies their bad opinion to a wider audience and tells the Twitter Algorithm that
this tweet is hotcakes, and that they should show it to more unrelated people in order to
further "the conversation".Naturally, shitty people are clued into this fact, and will act accordingly.
![Milking outrage for more engagement](https://raw.githubusercontent.com/soatok/dunktags/master/docs/bad-tweet-2.png)
**Why do well-meaning people keep falling for this?**
![We can do beter.](https://raw.githubusercontent.com/soatok/soatok/master/stickers/Soatok_STICKERPACK-FACEPAW.png)
## How Dunktags Help
Rather than *totally* refrain from dunking on someone for being bigoted or stupid, let's
just be smarter about how we dunk.Here's what you do:
1. Take a screenshot of the offending tweet. (See examples above.)
2. Archive the original tweet.
* This is important, because screenshots can be faked, and you want to keep receipts
if possible.
* Some archive services you can use:
* [The Internet Archive](https://archive.org)
* [Archive Today](https://archive.fo)
3. Use this library to generate a **dunktag** from the original tweet URL.
4. When you choose to dunk on this clown, instead of replying or quote-tweeting them,
simply post your screenshot (and archive URLs) with the hashtag generated by the
`dunktag()` function.Now you can dunk away without accidentally amplifying hate speech.
## Technical Documentation
### Installing this Library
From npm:
```terminal
npm install dunktags
```If you want to use dunktags globally, make sure you pass the `-g` flag.
```terminal
npm install -g dunktags
```### Using this Library after Installing
#### Command Line
First, make sure you run `tsc` to compile from TypeScript to JavaScript.
Next, launch Node.js like so:
```terminal
node
```Next, you should have a `>` prompt. Type the following then press enter:
```nodejs
const { dunktag } = require('dunktags');
```Now you can use the `dunktag()` function at your leisure.
```terminal
> dunktag('https://twitter.com/SoatokDhole/status/1103407038468681741');
'#dunk_6ea7143150'
>
```#### TypeScript Applications
```typescript
import { dunktag } from "dunktags";console.log(dunktag('https://twitter.com/SoatokDhole/status/1481105268138258437'));
// Outputs #dunk_3e45fd4499
```#### JavaScript Applications
```javascript
const { dunktag } = require('dunktags');
console.log(dunktag('https://twitter.com/SoatokDhole/status/1481105268138258437'));
// Outputs #dunk_3e45fd4499
```## Algorithm Description
Dunktags use BLAKE2b under the hood, with an output length of 5 bytes (10 hex characters),
and a constant BLAKE2b key of `0x572a7ff65e3969e1d1f43911cc07ff82463e5ae113f248dc9035d5e21aabad85`
(for domain separation). The key is the BLAKE2b hash of the string,
`Soatok Dreamseeker's dunktag function`.First, the Twitter user's tweet ID is extracted from the tweet. (Function: `getTweetId()`)
Next, the BLAKE2b hash of this tweet ID is calculated, using the above parameters.
This hex-encoded hash is returned with a constant prefix (`#dunk_`).