Skip to content

Instantly share code, notes, and snippets.

@reedy
reedy / gist:5397bb127ebb2b4e7eac
Last active August 29, 2015 14:04
mwgrep toolserver.org
reedy@tin:~$ mwgrep --max-results 350 toolserver.org
afwiki MediaWiki:Gadget-popups.js
afwiki MediaWiki:GeoHack.js
alswiki MediaWiki:Common.js
alswiki MediaWiki:Gadget-toolserver-integration.js
arcwiki MediaWiki:Gadget-popups.js
aswiki MediaWiki:Gadget-citations.js
barwiki MediaWiki:Common.css
be_x_oldwiki MediaWiki:Gadget-Popups.js
be_x_oldwiki MediaWiki:RefToolbar.js

Keybase proof

I hereby claim:

  • I am reedy on github.
  • I am tehreedy (https://keybase.io/tehreedy) on keybase.
  • I have a public key whose fingerprint is 1D98 867E 8298 2C8F E0AB C25F 9B69 B310 9D3B B7B0

To claim this, I am signing this object:

@reedy
reedy / updatetohead
Created September 24, 2014 15:32
Script to update mediawiki submodule to the head of its deployment branch
#!/bin/bash
if [ $# -ne 2 ]
then
echo "Usage: `basename $0` <branch> <extension>"
echo "e.g. `basename $0` 1.21wmf6 CodeReview"
exit
fi
PWD="`pwd`"
public static function TimedMediaEncoding() {
global $wgEnabledTranscodeSet, $wgEnabledAudioTranscodeSet;
if ( $wgEnabledTranscodeSet != "OGV_160P" || $wgEnabledTranscodeSet != WebVideoTranscode::ENC_OGV_160P ) {
$derivativeSettings[WebVideoTranscode::ENC_OGV_160P] =
array(
'maxSize' => '288x160',
'videoBitrate' => '160',
'framerate' => '15',
'audioQuality' => '-1',
class GuildWarsForeignAPIRepo extends ForeignAPIRepo {
function fetchImageQuery( $query ) {
global $wgMemc;
$query = array_merge( $query,
array(
'format' => 'json',
'action' => 'query'
) );
if ( $this->mApiBase ) {
#!/usr/bin/env python
#
# Copyright (c) 2013 Rob Lanphier, Wikimedia Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
import json
import requests
d = 0
for x in range(0, 114):
response = requests.request(
"GET",
"https://api.rebrandly.com/v1/links?apikey=<apikey>&offset=%d&orderBy=createdAt&orderDir=desc&" % (d)
).json()