This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| <?php | |
| /** | |
| * An implementation of the Aho-Corasick string matching algorithm for PHP. | |
| * | |
| * Alfred V. Aho and Margaret J. Corasick, "Efficient string matching: an aid to | |
| * bibliographic search", CACM, 18(6):333-340, June 1975. | |
| * | |
| * <http://xlinux.nist.gov/dads//HTML/ahoCorasick.html> | |
| * | |
| * Copyright (C) 2015 Ori Livneh <ori@wikimedia.org> |
| # Python implementation of Aho-Corasick string matching | |
| # | |
| # Alfred V. Aho and Margaret J. Corasick, "Efficient string matching: an aid to | |
| # bibliographic search", CACM, 18(6):333-340, June 1975. | |
| # | |
| # <http://xlinux.nist.gov/dads//HTML/ahoCorasick.html> | |
| # | |
| # Copyright (C) 2015 Ori Livneh <ori@wikimedia.org> | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # -*- coding: utf-8 -*- | |
| """ | |
| vsl.py | |
| ~~~~~~ | |
| Basic Python bindings for the Varnish log API | |
| Copyright 2015 Ori Livneh <ori@wikimedia.org> | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Check that jemalloc was built with `--enable-prof`. | |
| from ctypes import CDLL, byref, c_bool, c_size_t, sizeof | |
| from ctypes.util import find_library | |
| p = c_bool() | |
| jemalloc = CDLL(find_library('jemalloc')) | |
| jemalloc.mallctl(b'config.prof', byref(p), byref(c_size_t(1)), None, None) | |
| print('jemalloc %s built with `--enable-prof`.' % ('was' if p.value else 'was not')) |
| # Copyright (c) 2019 Ori Livneh | |
| # All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions | |
| # are met: | |
| # 1. Redistributions of source code must retain the above copyright | |
| # notice, this list of conditions and the following disclaimer. | |
| # 2. Redistributions in binary form must reproduce the above copyright | |
| # notice, this list of conditions and the following disclaimer in the |
| # -*- coding: utf-8 -*- | |
| import rrdtool | |
| # We're going to keep a full set of metrics for each of these. | |
| PLATFORMS = ('mobile', 'desktop') | |
| # TODO: Document. | |
| METRICS = ( | |
| 'backend', |
| # -*- coding: utf-8 -*- | |
| """ Check SVG gzip compression on Wikimedia varnishes """ | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding('utf-8') | |
| import StringIO | |
| import gzip | |
| import time | |
| import urllib2 |
| #!/usr/bin/env bash | |
| set +m | |
| cd /srv/mediawiki-local/extensions/VisualEditor | |
| die() { echo "$@" 1>&2 ; exit 1; } | |
| do_test() { | |
| /usr/lib/chromium-browser/chromium-browser \ | |
| --incognito \ | |
| --remote-debugging-port=9222 \ |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Watch the startup module for changes. | |
| import json | |
| import re | |
| import time | |
| import urllib2 | |
| URL = ('https://bits.wikimedia.org/en.wikipedia.org/load.php?debug=false&' |