Hide the distracting parts of YouTube!
| const PORT = 8035; | |
| const http = require('http'); | |
| const url = require('url'); | |
| const server = http.createServer((req, res) => { | |
| const i = req.url.indexOf('?'); | |
| let rawEvent = req.url; | |
| // The EventLogging client doesn't specify a name for the query parameter |
| (function () { | |
| // --- | |
| // EXPERIMENT DEFINITION | |
| // --- | |
| const experiment = { | |
| enabled: true, | |
| name: 'ext.Popups.instrumentation.eventLogging', | |
| buckets: { |
| <?php | |
| // Generated by go_go_gadget_export.php. | |
| 'wgPopupsConflictingNavPopupsGadgetName' => [ | |
| 'af' => 'popups', | |
| 'av' => 'popups', | |
| 'az' => 'popups', | |
| 'azb' => 'popups', | |
| 'be' => 'popups', |
| // $ curl -so /dev/null https://en.wikipedia.org/api/rest_v1/page/html/Barack_Obama -w '%{size_download}' | |
| var TOTAL_BYTES = 1582727; | |
| function total_bytes_for_ids(ids) { | |
| return ids.reduce( | |
| // 5 additional bytes for the "id=''" string | |
| (acc, id) => acc + id.length + 5, | |
| 0 | |
| ); | |
| } |
Patch: Developers submit a patch, sometimes with dependencies, to Gerrit. The patches are currently based off of the master branch and are merged to the master branch after they've been reviewed
Master: What gets deployed to production
Beta cluster: A test wiki that syncs the master branches of many extensions approximately every ten minutes, which is available at http://en.m.wikipedia.beta.wmflabs.org. The Release Engineering team run browser tests against the beta cluster every night
| import csv | |
| import hashlib | |
| raw_claims = open('claims.tsv', 'r') | |
| claims = csv.DictReader(raw_claims, delimiter='\t') | |
| aggregated_claims = {} | |
| for claim in claims: | |
| hash = hashlib.md5() | |
| hash.update(claim['event_pageId'].encode('utf-8')) |
Before enabling the wikidata role and provisioning set refreshonly = false in the wikidata-populate-site-tables in /path/to/mediawiki-vagrant/puppet/modules/role/manifests/wikidata.pp to ensure that SiteMatrix is up to date.
vagrant enable-role wikidata && vagrant provision
Ensure that Wikidata has appeared in the SiteMatrix (http://en.wiki.local.wmftest.net:8080/wiki/Special:SiteMatrix).
vagrant provision doesn't notice schema updates so: vagrant ssh -- foreachwiki update.php --quick
Create a property, e.g. "instance of". Make sure that it has Data type: item.
| <?php | |
| /** | |
| * zmq-API v@PACKAGE_VERSION@ Docs build by DocThor [2015-02-04] | |
| * @package zmq | |
| */ | |
| /** | |
| * @package zmq | |
| */ | |
| class ZMQ { |
| Experiment: version | |
| Scenario: | |
| Given the user is logged in | |
| Then they should have a 70% chance of being "A" | |
| And they should have a 30% chance of being "B" |