Skip to content

Instantly share code, notes, and snippets.

@werdnum
werdnum / .gitignore
Last active August 29, 2015 14:10
Playground for developing a 'drag away this element as an image' function
bower_components
@werdnum
werdnum / .gitmodules
Last active August 29, 2015 14:10
OOUI Playground
[submodule "lib/oojs-ui"]
path = lib/oojs-ui
url = ssh://gerrit.wikimedia.org:29418/oojs/ui.git
@werdnum
werdnum / -
Created January 13, 2015 09:26
title $out->getPageTitle()
pagetitle $out->getHTMLTitle()
displaytitle $out->mPageLinkTitle
thispage $this->thispage
titleprefixeddbkey $this->thispage
titletext $title->getText()
articleid $title->getArticleID()
isarticle $out->isArticle()
subtitle $subpagestr . $out->getSubtitle()
undelete ''
@werdnum
werdnum / -
Created February 16, 2015 14:32
# = Class: labs_vagrant
#
# Configure a labs host to use MediaWiki-Vagrant to manage local wikis
#
# == Parameters:
# - $install_directory: Directory to install MediaWiki-Vagrant in.
# Default /srv/vagrant
#
class labs_vagrant(
$install_directory = '/srv/vagrant',
@werdnum
werdnum / README.md
Last active August 29, 2015 14:15
Labs-Vagrant on your own VM

I like labs-vagrant, and I like it even better when I can run it on my own server.

Eight commands to get labs-vagrant on your own Ubuntu server, from scratch.

# apt-get install puppet git
# git clone https://git.wikimedia.org/git/operations/puppet.git
# cd puppet
# git checkout -B production origin/production
# cd ..
vagrant:/vagrant/ (lsg-role✗) $ grep log /etc/hhvm/fcgi.ini [16:26:13]
hhvm.debug.core_dump_report_directory = /var/log/hhvm
hhvm.log.admin_log.file = /var/log/hhvm/admin.log
hhvm.log.always_log_unhandled_exceptions = true
hhvm.log.header = true
hhvm.log.level = Warning
hhvm.log.native_stack_trace = true
hhvm.log.runtime_error_reporting_level = 8191
hhvm.log.use_syslog = true
<?php
namespace OOUIPlayground\Combinatorics;
return array(
'button' => new PropertyCombiner( array(
'flags' => new FlagsList( new ComposedProperty( array(
new OptionalProperty(
new SingleChoiceProperty( array( 'constructive', 'destructive', 'progressive' ) )
),
.as-protanopia {
-webkit-filter: url(filters.svg#protanopia);
-moz-filter: url(filters.svg#protanopia);
-ms-filter: url(filters.svg#protanopia);
-o-filter: url(filters.svg#protanopia);
filter: url(filters.svg#protanopia); /* Firefox 3.5+ */
}
.as-deuteranopia {
-webkit-filter: url(filters.svg#deuteranopia);
#!/bin/zsh
DIRS=(`echo ~/wm-dev/vagrant{,/mediawiki{,/extensions/*,/skins/*}}`)
for dir in $DIRS; do
test -d $dir || continue;
test -e $dir/.git || continue;
(
cd $dir &&
git pull --rebase || echo "Pull failed on $dir" && break
elastic+ 9328 0.0 0.0 15940 940 ? Ss Mar14 0:00 /tmp/heimao24
elastic+ 9333 0.0 0.0 15940 940 ? S Mar14 0:03 /tmp/heimao24
elastic+ 9334 0.0 0.0 15940 940 ? S Mar14 0:00 /tmp/heimao24
elastic+ 9335 0.0 0.0 15940 940 ? S Mar14 1:08 /tmp/heimao24
elastic+ 9336 0.0 0.0 15940 940 ? S Mar14 0:00 /tmp/heimao24
elastic+ 9337 0.0 0.0 15940 940 ? S Mar14 0:00 /tmp/heimao24
elastic+ 9339 0.0 0.0 15940 940 ? S Mar14 0:00 /tmp/heimao24
elastic+ 9340 0.0 0.0 15940 940 ? S Mar14 0:30 /tmp/heimao24
elastic+ 9763 0.2 0.0 85500 1216 ? Ssl Mar11 18:42 /tmp/Conr
elastic+ 16042 0.0 0.0 16964 976 ? Ss Mar12 0:00 /tmp/Linux24 > /dev/null 2>&1