I hereby claim:
- I am ChlodAlejandro on github.
- I am chlod (https://keybase.io/chlod) on keybase.
- I have a public key whose fingerprint is D7B4 3C2E D795 86A6 1E4A 8D0F A1E6 7C59 037B 0CC1
To claim this, I am signing this object:
const includeClosed = false; | |
const includeFishbowl = false; | |
const includePrivate = false; | |
const includeNonglobal = false; | |
fetch("https://meta.wikimedia.org/w/api.php?action=sitematrix&format=json&formatversion=2") | |
.then(r => r.json()) | |
.then(({ sitematrix }) => { | |
let count = 0; | |
if (includeClosed && includeFishbowl && includePrivate && includeNonglobal) |
#!/usr/bin/env python3 | |
# 1. Install Python 3 if you don't have it yet. | |
# 2. Download your data dump (Settings > Privacy and Safety > Request Data) | |
# 3. Wait for the dump to get sent, then download it. | |
# 4. Extract the dump to any folder. | |
# 5. Download and place this file in the "messages" folder of your data dump. | |
# 6. Run it with `python3 discord-scatter-plot.py` | |
# 7. (optional) You can edit the "serverYouWant" variable down below to specify a specific server. | |
# This accepts a server ID. To get the server ID, enable "Developer Mode" (Settings > Advanced), | |
# right click on a server, and then click on "Copy ID". |
// save result of https://quarry.wmcloud.org/query/80025 as csv | |
// put in directory as "masterlist.csv" | |
import * as fs from "fs"; | |
import fetch from "node-fetch" | |
const BASE_URL = "https://cnnphilippines.com"; | |
const data = fs.readFileSync("masterlist.csv").toString("utf8").split("\n").slice(1); | |
if (fs.existsSync("a.txt")) | |
fs.unlinkSync("a.txt"); |
/*! | |
Calculates open CopyPatrol cases which can't be actioned (page is | |
deleted or content is already revision-deleted). | |
Run the following commands beforehand: | |
```sh | |
npm install knex mysql2 dotenv | |
# Replace <shell> with your Toolforge username. | |
ssh -L 4711:enwiki.analytics.db.svc.eqiad.wmflabs:3306 -L 4712:tools.db.svc.eqiad.wmflabs:3306 <shell>@dev.toolforge.org -Nv | |
``` |
import WikimediaStream from "wikimedia-streams"; | |
import axios from 'axios'; | |
import * as fs from "fs/promises"; | |
import { MediaWikiRecentChangeEditEvent } from "wikimedia-streams/build/src/streams/MediaWikiRecentChangeEvent"; | |
import { diffSentences } from "diff"; | |
const outputFile = "data.json"; | |
const outputMap: Record<string, number> = {}; | |
(async () => { |
// !!! | |
// This version is !! UNMAINTAINED !! | |
// See https://github.com/ChlodAlejandro/deputy/tree/main/scripts/cpcrc.js for an updated version. | |
// !!! | |
/** | |
* Counts the number of instances of {{CPC}} transclusions in the Wikipedia:Copyright problems pagespace. | |
* ================================================================================================ | |
* Copyright © 2022 Chlod Aidan Alejandro | |
* |
type ArrayOrNot<T> = T | T[]; | |
export default function ( | |
...classes: ArrayOrNot<string | null | undefined | false>[] | |
): string { | |
const processedClasses = []; | |
for (const _class of classes) { | |
if (Array.isArray(_class)) processedClasses.push(..._class); | |
else processedClasses.push(_class); |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# Make sure that you have a `cd` group for continuous deployment purposes. | |
# Also make sure that this group is already in the `sudoers.d` file, allowing | |
# sudo for systemctl operations ONLY (possibly git, if you want as well). | |
# This will output the SSH private key on your current directory. | |
# To delete the generated user, use `deluser --remove-home <username>` | |
# Tested on Debian 11. |
<title>{title}</title> | |
<meta name="twitter:card" content="summary"/> | |
<meta name="twitter:creator" content="ChlodAlejandro"/> | |
<meta name="twitter:image" content="{image}"/> | |
<meta name="og:title" property="og:title" content="{title}" /> | |
<meta name="og:description" property="og:description" content="{description}" /> | |
<meta name="description" content="{description}"> | |
<meta name="og:image" property="og:image" content="{image}"/> |