This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Delpher met Wikitext | |
// @supportURL https://nl.wikipedia.org/wiki/Gebruiker:1Veertje/Delpher_userscript | |
// @namespace https://*.delpher.nl/nl/* | |
// @version 0.8 | |
// @description Delpher WP improvement | |
// @author 1Veertje | |
// @match https://*.delpher.nl/nl/* | |
// @grant none |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by Vera de Kok - aka 1Veertje 01.01.2021 | |
# builds QuickStatments that assigns a family name as a property in Wikidata | |
# Reads a list of family names from dict.csv | |
# | |
# Please carefully check for false positives! | |
# | |
from SPARQLWrapper import SPARQLWrapper, JSON | |
import csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import mysql.connector | |
mydb = mysql.connector.connect( | |
host="localhost", | |
user="root", | |
password="", | |
database="default" | |
) | |
mycursor = mydb.cursor() | |
sql = "INSERT INTO table (page, filename) VALUES (%s, %s )" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$text = ''; | |
if(isset($_GET['cmtitle']) && preg_match('/^Category:(.+)/', $_GET['cmtitle'])){ | |
$cmtitle = str_replace(" ", "_", $_GET['cmtitle']); | |
$params = array ("cmtitle" => $cmtitle , "action" => "query", "list" => "categorymembers", "cmlimit" => "500", "format" => "json", "cmtype" => "file"); | |
$files = json_decode(file_get_contents("https://commons.wikimedia.org/w/api.php?".http_build_query($params)), true); | |
$files = $files['query']['categorymembers']; | |
if (count($files) > 0){ | |
foreach ($files as $file) { | |
$text .= $file['title']."<br/>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name MUBI id | |
// @namespace https://mubi.com/ | |
// @version 0.2 | |
// @description show mubi id in the interface | |
// @author VDK | |
// @match https://mubi.com/* | |
// @grant none | |
// ==/UserScript== | |
function docReady(fn) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$key = 'googleAPIkey'; | |
if (isset($_GET['user'])){ | |
$user = strip_tags($_GET['user']); | |
$var = 'user'; | |
} | |
elseif(isset($_GET['channel_id'])){ | |
$user = strip_tags($_GET['channel_id']); | |
$var = 'channel_id'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head><title>Redirects builder</title> | |
<meta charset="UTF-8"> | |
<script type="text/javascript"> | |
function myFunction(){ | |
document.getElementById('row0').focus(); | |
document.getElementById('row0').click(); | |
} | |
</script> | |
<body onLoad="myFunction()"> |