Instantly share code, notes, and snippets.

View smart-pointer-overload.cpp
#include <iostream>
class Obj;
class Wrapper {
Obj* ptr;
public:
Wrapper(Obj* aptr) : ptr(aptr) {}
Obj& operator*() {
View gist:bee024ddc48a82950524a6b34fe0e353
(Fedora 28; Photos installed from fedora repo)
$ gio info 'Screenshot from 2018-05-11 09-15-17.png.gnome-photos'
display name: Screenshot from 2018-05-11 09-15-17.png.gnome-photos
edit name: Screenshot from 2018-05-11 09-15-17.png.gnome-photos
name: Screenshot from 2018-05-11 09-15-17.png.gnome-photos
type: regular
size: 1219
uri: file:///home/brion/Pictures/Screenshot%20from%202018-05-11%2009-15-17.png.gnome-photos
attributes:
View gist:bda3be94f6be3998e7b031b8737829a3
This is some weird stuff. Seeing >500ms latencies between London (on British Library's guest network) and WMF's Virginia DC.
$ traceroute gerrit.wikimedia.org
traceroute to gerrit.wikimedia.org (208.80.154.85), 64 hops max, 52 byte packets
1 controller (10.2.0.2) 2.761 ms 2.493 ms 1.171 ms
2 10.1.2.1 (10.1.2.1) 2.250 ms 2.211 ms 1.628 ms
3 37.205.58.145 (37.205.58.145) 3.566 ms 2.984 ms 2.582 ms
4 10.100.14.182 (10.100.14.182) 513.088 ms 51.117 ms 2.626 ms
5 9-1-6.ear2.london15.level3.net (217.163.45.205) 93.576 ms 3.060 ms 2.703 ms
6 ae-2-3204.ear2.london2.level3.net (4.69.143.194) 3.324 ms
View missing-objects.txt
Updating: org.freedesktop.Platform.GL.nvidia-384-90/x86_64/1.4 from flathub
Warning: Failed to update org.freedesktop.Platform.GL.nvidia-384-90/x86_64/1.4: While pulling runtime/org.freedesktop.Platform.GL.nvidia-384-90/x86_64/1.4 from remote flathub: No such metadata object e92eaddbf30d6b0e12944de48c2d9283f28d58414f503cecbc67a661cbd3fcd4.commit
Updating: org.freedesktop.Platform.Compat32/x86_64/1.6 from flathub
View webm header hexdump.txt
00000000 1a 45 df a3 01 00 00 00 00 00 00 1f 42 86 81 01 |.E..........B...|
00000010 42 f7 81 01 42 f2 81 04 42 f3 81 08 42 82 84 77 |B...B...B...B..w|
00000020 65 62 6d 42 87 81 02 42 85 81 02 18 53 80 67 01 |ebmB...B....S.g.|
00000030 00 00 00 02 79 b2 12 11 4d 9b 74 40 2e 4d bb 8b |....y...M.t@.M..|
00000040 53 ab 84 15 49 a9 66 53 ac 81 df 4d bb 8c 53 ab |S...I.fS...M..S.|
00000050 84 16 54 ae 6b 53 ac 82 01 3b 4d bb 8e 53 ab 84 |..T.kS...;M..S..|
00000060 1c 53 bb 6b 53 ac 84 02 79 b1 11 ec 01 00 00 00 |.S.kS...y.......|
00000070 00 00 00 a2 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
View gist:e7ea2f458b019ace6476bfb20ae591c0
$ gnome-builder
2017-04-26 16:22:32.014 gnome-builder[7313:199409] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead.
16:22:32.0023 libpeas[1274060944]: WARNING: Failed to get 'ide_webkit_register_types' for module 'webkit': 'ide_webkit_register_types': dlsym(RTLD_DEFAULT, ide_webkit_register_types): symbol not found
16:22:32.0023 libpeas[1274060944]: WARNING: Error loading plugin 'webkit'
16:22:32.0035 libpeas[1274060944]: WARNING: Failed to load module 'python3loader': dlopen(/usr/local/Cellar/libpeas/1.20.0/lib/libpeas-1.0/loaders/libpython3loader.so, 10): image not found
16:22:32.0035 libpeas[1274060944]: WARNING: Could not load plugin loader 'python3'
16:22:32.0044 libpeas[1274060944]: WARNING: Could not find plugin
View LocalSettings.php
$wgEnabledTranscodeSet = [];
$wgEnabledTranscodeSet[] = WebVideoTranscode::ENC_OGV_160P;
$wgEnabledTranscodeSet[] = WebVideoTranscode::ENC_OGV_240P;
$wgEnabledTranscodeSet[] = WebVideoTranscode::ENC_OGV_360P;
$wgEnabledTranscodeSet[] = WebVideoTranscode::ENC_OGV_480P;
$wgEnabledTranscodeSet[] = WebVideoTranscode::ENC_OGV_720P;
$wgEnabledTranscodeSet[] = WebVideoTranscode::ENC_OGV_1080P;
$wgEnabledTranscodeSet[] = WebVideoTranscode::ENC_WEBM_160P;
View gist:5a8641d983da03677147305ba7472102
$ vagrant provision
==> default: Running provisioner: lsb_check...
==> default: Running provisioner: puppet...
==> default: Running Puppet with site.pp...
==> default: Info: Loading facts in /vagrant/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
==> default: Info: Loading facts in /vagrant/puppet/modules/stdlib/lib/facter/pe_version.rb
==> default: Info: Loading facts in /vagrant/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
==> default: Info: Loading facts in /vagrant/puppet/modules/stdlib/lib/facter/root_home.rb
==> default: Notice: Compiled catalog for mediawiki-vagrant.dev in environment production in 11.47 seconds
==> default: Info: Loading facts in /vagrant/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
View sample1.js
'use strict';
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("n
View ES2017.js
const remainder = end - this._cache.writeOffset;
if (remainder > 0) {
await this._backend.buffer(remainder, cancelToken);
}