Skip to content

Instantly share code, notes, and snippets.

View kghbln's full-sized avatar
🐇
Tempus ipsum affert consilium.

Karsten Hoffmeyer kghbln

🐇
Tempus ipsum affert consilium.
View GitHub Profile
@ciencia
ciencia / cleanupUsersWithNoId.php
Last active June 21, 2023 18:08
cleanupUsersWithNoId.php REL1_35 uncyclopedia fixes
<?php
/**
* Cleanup tables that have valid usernames with no user ID
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
-- By Jeroen De Dauw / https://Professional.Wiki
-- License: GPL-2.0-or-later
SELECT * FROM /*_*/wb_id_counters;
REPLACE INTO /*_*/wb_id_counters VALUE((SELECT COALESCE(MAX(CAST(SUBSTRING(`page_title`, 2) AS UNSIGNED)), 0) FROM `page` WHERE `page_namespace` = 120), 'wikibase-item');
REPLACE INTO /*_*/wb_id_counters VALUE((SELECT COALESCE(MAX(CAST(SUBSTRING(`page_title`, 2) AS UNSIGNED)), 0) FROM `page` WHERE `page_namespace` = 122), 'wikibase-property');
SELECT * FROM /*_*/wb_id_counters;
#!/bin/bash
# Daniel Verner
# CarrotPlant LLC
# 2011
# Backup each mysql databases into a different file, rather than one big file
# Optionally files can be gzipped (dbname.gz)
#
# Usage: dump_all_databases [ -u username -o output_dir -z ]
#
# -u username to connect mysql server
@s7eph4n
s7eph4n / List format overhaul.md
Last active February 28, 2024 00:58
List format overhaul: Change description

List format overhaul: Change description

Changes Overview

  • Wrapped components of the list format in HTML elements
  • Added class attributes to HTML elements of list, ol and ul formats to facilitate styling
  • Added plainlistformat
  • template format becomes alias of the plainlist format
@ilhooq
ilhooq / importWikispaces.php
Last active September 26, 2018 15:28
Import wiki from WikiSpaces to MediaWiki
<?php
/**
* Import pages from Wikispaces
*
* ======================================================================
*
* To use this script, put it in your MediaWiki 'maintenance' folder
* Then call the script on the command line.
*
* Examples of use :
@dweldon
dweldon / install-docker.sh
Last active April 8, 2022 11:18
Install docker CE on Linux Mint 18.3
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/
anonymous
anonymous / -
Created December 2, 2017 12:38
System: Host: pandorea Kernel: 4.4.0-101-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.6.6 (Gtk 3.18.9-1ubuntu3.3) dm: mdm Distro: Linux Mint 18.3 Sylvia
Machine: Mobo: ASUSTeK model: B150M-C v: Rev X.0x Bios: American Megatrends v: 2003 date: 09/19/2016
CPU: Quad core Intel Core i5-6500 (-MCP-) cache: 6144 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 25535
clock speeds: min/max: 800/3600 MHz 1: 3299 MHz 2: 3300 MHz 3: 3300 MHz 4: 3300 MHz
Graphics: Card: Intel Sky Lake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:1912
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
Resolution: [email protected]
GLX Renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2)
anonymous
anonymous / -
Created August 17, 2017 21:31
System: Host: pandorea Kernel: 4.4.0-53-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.2.7 (Gtk 3.18.9-1ubuntu3.3) dm: mdm Distro: Linux Mint 18.1 Serena
Machine: Mobo: ASUSTeK model: B150M-C v: Rev X.0x Bios: American Megatrends v: 2003 date: 09/19/2016
CPU: Quad core Intel Core i5-6500 (-MCP-) cache: 6144 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 25535
clock speeds: min/max: 800/3600 MHz 1: 3299 MHz 2: 3300 MHz 3: 3299 MHz 4: 3300 MHz
Graphics: Card: Intel Sky Lake Integrated Graphics bus-ID: 00:02.0 chip-ID: 8086:1912
Display Server: X.Org 1.18.4 drivers: intel (unloaded: fbdev,vesa)
Resolution: [email protected]
GLX Renderer: Mesa DRI Intel HD Graphics 530 (Skylake GT2)
@azizur
azizur / Creating a static copy of a dynamic website.md
Last active November 7, 2024 17:32
Creating a static copy of a dynamic website

The command line, in short…

wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/

…and the options explained

  • -k : convert links to relative
  • -K : keep an original versions of files without the conversions made by wget
  • -E : rename html files to .html (if they don’t already have an htm(l) extension)
  • -r : recursive… of course we want to make a recursive copy
  • -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.
<!--
This is a sample application that shows how to use the Pageview API.
Read more here: https://wikitech.wikimedia.org/wiki/Analytics/AQS/Pageview_API
The most important code is inside the updateChart function, towards the end of the file.
The rest of the code is just html, css and input setup.
Disclaimer: This is just sample code, it has not been tested in all browsers/devices.
Distributed under the Unlicense: http://unlicense.org/
-->