Skip to content

Instantly share code, notes, and snippets.

/* **********************************************************************************************
* Wiki mass attribution import script
*
* Author: User:Inquisitor Sasha
* Created for Orain wikis to import content from Wikia
* This script is freely available for reuse and modification under CC-BY-SA
*
* To use this script, copy it into the MediaWiki:Vector.js file on your wiki. You will need
* to change the domain in the variable wikiDomain to the full domain of the wiki that you
* are importing content from.
@Inquisitor-Sasha
Inquisitor-Sasha / WikiLogo.js
Last active August 29, 2015 13:57
Change the wiki logo for a wiki without server access to set the logo image file path or upload access to the current logo image.
/* **********************************************************************************
* MediaWiki logo replacer script
* Author: Inquisitor Sasha
* Contributors:
*
* Developed for the Orain MediaWiki free wiki hosting service
*
* Replace the current logo of the wiki with your own logo image from anywhere
* Additionally, your can change the page that the logo image will link to,
* such as if your wiki uses a different main page title from the standard
@Inquisitor-Sasha
Inquisitor-Sasha / desu.py
Created February 8, 2014 01:08
Half gigabyte of desu. In honor of Dondre Khan for spamming desu verbally.
desuCount = 1
while desuCount <= 1000:
desuNum = 1
desuFile = open( 'DESU/desu_'+str(desuCount)+'.txt', 'a' )
while desuNum <= 100000:
desuFile.write( 'DESU ' )
desuNum = desuNum + 1
desuFile.close()
desuCount = desuCount + 1
@Inquisitor-Sasha
Inquisitor-Sasha / swtr
Created February 3, 2014 05:05
Simplifies the command to upload files to the SashaWeb.net webserver. Best when used with a combined GUI terminal that allows dropping files to supply file paths.
#!/bin/bash
scp $1 sasha@server.sturmkrieg.com:/server/******/******/sashaweb.net/www/$2
@Inquisitor-Sasha
Inquisitor-Sasha / hash.php
Created February 2, 2014 05:18
SHA256 hash generator for PHP. Run from the command line: php hash.php <some value>
<?php
$text = $argv[1];
$br = '
';
$output = hash( sha256, $text );
echo $output, $br;
@Inquisitor-Sasha
Inquisitor-Sasha / makeWikiScript.php
Last active December 27, 2015 20:09
Script concepts for creating a new wiki using Simple Farm.
<?php
# Inquisitor Ehrenstein
# inquisitorsasha@sturmkrieg.ru
# GNU General Public License
if( !defined( 'MEDIAWIKI' ) ) {
echo( "This is an extension to the MediaWiki package and cannot be run standalone.\n" );
die( -1 );
}
@Inquisitor-Sasha
Inquisitor-Sasha / make-wiki.sh
Last active December 27, 2015 15:39
This is a shell script that can be used with the MediaWiki extension SimpleFarm to create new wikis quickly with a single command from the MediaWiki directory. The number of commands needed when running the script can be reduced by manually replacing variables in the script with what they will always be. For example, if you use the same admin us…
#!/bin/bash
# Inquisitor Ehrenstein
# inquisitorsasha@sturmkrieg.ru
# GNU Free Documentation License
# $1 = Wiki name
# $2 = Wiki admin user name
# $3 = Wiki admin user password
# $4 = Wiki database name
/* SIDEBAR BANNER SCRIPT
CREATED BY: Inquisitor Ehrenstein
CONTRIBUTORS:
LICENSE:
*/
var bannerCode = '';
var bannerDisplay = true;
@Inquisitor-Sasha
Inquisitor-Sasha / MediaWikiBanner.js
Last active December 23, 2015 17:09
This is a script that is intended to create a banner on MediaWiki powered wikis when added to the MediaWiki:Common.js page. It was written for a wiki at Wikia, but it can be modified to be used with any skin, including Vector. To do that, just replace the name of the Oasis skin and change the ID of the page element to add the banner before to th…
/* BANNER FOR THE WIKI
WRITTEN BY: Inquisitor Ehrenstein
CONTRIBUTORS:
LICENSE: CC-BY-SA
*/
//Controls whether the banner will be displayed
//Set this to true if you want the banner to be displayed