Skip to content

Instantly share code, notes, and snippets.

View montehurd's full-sized avatar

montehurd

  • Wikimedia Foundation
  • San Francisco, US
View GitHub Profile
@montehurd
montehurd / mediawiki-docker-basic-installations.md
Last active October 7, 2022 17:05
mediawiki-docker-basic-installations

Note: superceded by https://gitlab.wikimedia.org/mhurd/mediawiki-docker-make


I'm using this page to document experimentation with the new docker bits in Mediawiki core.

How to download, install and run a basic MediaWiki instance, from scratch, using Docker, and wire up PHPStorm debugging

These instructions are intended for someone who has no previous MediaWiki experience, who is interested in getting a basic instance of MediaWiki running on their local machine.

@montehurd
montehurd / matplotlib.sh
Last active August 4, 2022 21:26
Super easy method for experimenting with matplotlib graphs - with a bunch of examples. Approach used below is for purpose of quick prototyping (configure graphs, convert output to base64 encoded html tags, send html directly to browser). Script is easily modified and can run by pasting its text into a Terminal window. Tested on macOS.
#!/bin/bash
# Edit: this code is simply horrible in many ways, but that's how we learn I suppose.
# See the comment below for a better example:
# https://gist.github.com/montehurd/1f8ffb8de517adc1d54d6e6b62ad9f88?permalink_comment_id=3742328#gistcomment-3742328
read -r -d '' PYTHON_SCRIPT << --END
@montehurd
montehurd / info-from-list-of-article-titles.txt
Last active May 7, 2020 02:56
Info from list of article titles
https://en.m.wikipedia.org/w/api.php?action=query&continue=&exchars=525&exintro=1&exlimit=24&explaintext=&format=json&pilimit=24&piprop=thumbnail&pithumbsize=640&prop=extracts%7Cpageterms%7Cpageimages&titles=Bruce%20Kingsbury%7CMartin%20Luther%20King%2C%20Jr.%7CGlenn%20Frey%7CMartin%20Luther%20King%2C%20Jr.%20Day%7CThe%20Revenant%20%282015%20film%29%7CUFC%20Fight%20Night%3A%20Dillashaw%20vs.%20Cruz%7CDavid%20Bowie%7CSteven%20Avery%7CDirty%20Deeds%20Done%20Dirt%20Cheap%20%28song%29%7CBernie%20Sanders%7CStar%20Wars%3A%20The%20Force%20Awakens%7CBlue%20Monday%20%28date%29%7CJava%20%28programming%20language%29%7CMaking%20a%20Murderer%7CPeyton%20Manning%7CAlan%20Rickman%7CDominick%20Cruz%7CSean%20Penn%7CAdam%20Driver%7CDeaths%20in%202016%7CHugh%20Glass%7CList%20of%20Super%20Bowl%20champions%7CEagles%20%28band%29%7CAngie%20Tribeca&wbptterms=description
@montehurd
montehurd / macOS-mov-to-gif-file-conversion.sh
Last active October 26, 2020 23:24
Simple optimized .mov to .gif conversion from macOS command line using only ffmpeg and gifsicle - with instructions for automatic conversion any time a .mov file is dropped into a special folder.
ffmpeg -i in.mov -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 > out.gif
@montehurd
montehurd / ios-simulator.applescript
Last active May 7, 2020 02:58
iOS Simulator Automator AppleScript
on run {input, parameters}
tell application "Safari"
activate
end tell
delay 0.25
tell application "System Events"
@montehurd
montehurd / CenteredPathView.m
Last active May 7, 2020 02:44
CenteredPathView
// Draws a CGPath scaled to fix exactly within the view.
// Created by Monte Hurd on 8/26/14.
// CenteredPathView.h
#import <UIKit/UIKit.h>
@interface CenteredPathView : UIView
-(id)initWithPath: (CGPathRef)newPath
@montehurd
montehurd / old-schema.txt
Last active May 7, 2020 02:58
OldSchema
article
id
dateCreated
lastScrollX
lastScrollY
title
domain (i.e. “en” or “fr”)
domainName (“English” or “French” - but *in* french)
site (i.e. wikipedia.org)
thumbnailImageID