Skip to content

Instantly share code, notes, and snippets.

afsd
<div>sadf</div>

MediaWiki Usage Visualization and Web Service API

First and foremost, many thanks to Brian Flad and Core Systems’ UNIX Team for configuring MediaWiki, providing tested mass import mechanisms, and setting up MySQL replication. It’s one thing to setup a service for public use -- it’s another to make it public, accessible, and usable. By skimming the recent changes page, it’s easy to see that the platform is gaining traction as several groups have started using it.

In order to show our gratitude, Jamie Ly of Learning Lab and I decided to build a web application that would visualize the recent changes page. To accomplish this several things had to happen:

  1. Populate recent changes data into a datastore independent of MediaWiki’s
  2. Make t

Lesson Plan

Getting something running

  • How to represent Tic Tac Toe data
  • How to structure a program
    • Abstraction
    • High-level design
    • Pseudocode
  • Debugging
    • Javascript alerts
  • Array indicies
--- subscribe2.bak.php 2010-10-08 13:05:14.000000000 -0400
+++ subscribe2.php 2010-10-08 14:39:48.000000000 -0400
@@ -53,30 +53,51 @@
// start our class
class s2class {
// variables and constructor are declared at the end
-
+ function should_use_ssl() {
+ return isset($this->subscribe2_options['use_ssl']) && $this->subscribe2_options['use_ssl'] == 'yes';
+ }
@jamiely
jamiely / experiment.sh
Created December 5, 2010 19:26
A file to run all the Wattch experiments.
#!/bin/bash
# runs a single experiment
base=$1
commandstring=$2
echo "Operating on file ${1} ${base}"
sim_opts=" -fastfwd 1000000 -max:inst 10000000 "
@jamiely
jamiely / BND_get_universe.cfm
Created April 29, 2011 18:00
Bond e-mail fix
<cfelseif ListGetAt(record,13) NEQ "!NA"> <!--- This bond has a date for pricing, but does not have a price yet --->
<cfparam name="application.bad_bonds" default="#StructNew()#" />
<cfset variables.bad_bond_cusip = ListGetAt(record,1) />
<cfif NOT StructKeyExists(application.bad_bonds, bad_bond_cusip)
OR DateDiff("h", application.bad_bonds[bad_bond_cusip], Now()) GT 6>
<!--- only send if we dont have a record of sending it or it has been 6 hours since we last sent one --->
<cfmail to="#application.admin_Email#" from="otis_aw@aw.com" subject="#application.URL#: Morning Process: Bond Record with bad data">
The following record had bad data in either price or shares outstanding on #application.title#:
@jamiely
jamiely / Behavior.cpp
Created June 21, 2011 20:53
Behavior.cpp
#include "StdAfx.h"
#include "Behavior.h"
#include <math.h>
//Adjust the gain constants to tune the controller response
float Behavior::g_fMaxSpeed = 10.0f;
float Behavior::g_fMaxAccel = 10.0f;
float Behavior::g_fKNeighborhood = 100.0f;
float Behavior::g_fOriKv = 1.0; // Orientation
@jamiely
jamiely / Avoid.cpp
Created June 24, 2011 02:35
Avoid.cpp
#include "StdAfx.h"
#include "Avoid.h"
#include "Arrival.h"
float Avoid::g_fKAvoid = 1000.0f;
float Avoid::g_fTAvoid = 5.0f;
float Avoid::g_fDistanceAvoid = 10.0f;
Avoid::Avoid(vec3 target, const std::vector<Obstacle>& obstacles) :
Behavior("avoid"), m_pTarget(target), m_pObstacles(obstacles)
@jamiely
jamiely / request.json
Created July 21, 2011 20:44
Intermap - API Issue 20110721
{"text":"New term 11","central":false,"projectId":9}
@jamiely
jamiely / charles_overview
Created August 4, 2011 13:36
Intermap - API Issue 20110804 - Tag Creation
URL http://localhost/intermap/store/index.cfm/api/v1/tags
Status Complete
Response Code 500 Internal Server Error
Protocol HTTP/1.1
Method POST
Content-Type text/html; charset=UTF-8
Client Address /127.0.0.1
Remote Address localhost/127.0.0.1
Timing
Request Start Time 8/4/11 9:34:03 AM