Skip to content

Instantly share code, notes, and snippets.

View zrhoffman's full-sized avatar

Zach Hoffman zrhoffman

View GitHub Profile
4:21.31 error[E0524]: two closures require unique access to `addend` at the same time
4:21.32 --> servo/components/style/custom_properties.rs:1194:42
4:21.32 |
4:21.33 1155 | fn substitute_block<'i>(
4:21.33 | -- lifetime `'i` defined here
4:21.34 ...
4:21.34 1194 | input.parse_nested_block(|input| {
4:21.35 | ^^^^^^^ closures are constructed here in different iterations of loop
4:21.35 ...
4:21.35 1229 | addend,
@zrhoffman
zrhoffman / Dockerfile
Last active December 17, 2020 21:24
linux/arm64 golang on alpine
FROM alpine:3.12
RUN ln -s lib lib64 && \
ln -s ld-musl-x86_64.so.1 lib/ld-linux-x86-64.so.2
RUN set -o pipefail && \
wget -O- https://golang.org/dl/go1.15.6.linux-amd64.tar.gz | \
tar xzC usr/local
ENV PATH=${PATH}:/usr/local/go/bin \
GOPATH=/go
@zrhoffman
zrhoffman / trafficvault.log
Last active October 21, 2020 22:27
CDN in a Box log for Traffic Vault when https://github.com/apache/trafficcontrol/issues/5182 occurs
Attaching to cdn-in-a-box_trafficvault_1
trafficvault_1 | 2020-10-21T18:44:26.626205205Z
trafficvault_1 | 2020-10-21T18:44:26.626254805Z ; <<>> DiG 9.9.5-3ubuntu0.19-Ubuntu <<>> @dns dns
trafficvault_1 | 2020-10-21T18:44:26.626260805Z ; (1 server found)
trafficvault_1 | 2020-10-21T18:44:26.626264105Z ;; global options: +cmd
trafficvault_1 | 2020-10-21T18:44:26.626267105Z ;; Got answer:
trafficvault_1 | 2020-10-21T18:44:26.626270105Z ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59875
trafficvault_1 | 2020-10-21T18:44:26.626273705Z ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 13, ADDITIONAL: 1
trafficvault_1 | 2020-10-21T18:44:26.626276905Z
trafficvault_1 | 2020-10-21T18:44:26.626279905Z ;; OPT PSEUDOSECTION:
@zrhoffman
zrhoffman / dmesg-drm.debug=0xf.log
Created May 10, 2020 19:16
dmesg with drm.debug=0xf
[ 13.331795] [drm:amdgpu_dm_irq_register_interrupt [amdgpu]] DM_IRQ: added irq handler: 000000004cb73ae6 for: dal_src=82, irq context=1
[ 13.331865] [drm:amdgpu_dm_irq_register_interrupt [amdgpu]] DM_IRQ: added irq handler: 00000000ae95fc7e for: dal_src=83, irq context=1
[ 13.331928] [drm:amdgpu_dm_irq_register_interrupt [amdgpu]] DM_IRQ: added irq handler: 00000000bc005e24 for: dal_src=72, irq context=1
[ 13.331991] [drm:amdgpu_dm_irq_register_interrupt [amdgpu]] DM_IRQ: added irq handler: 000000000eb6b9f2 for: dal_src=73, irq context=1
[ 13.332053] [drm:amdgpu_dm_irq_register_interrupt [amdgpu]] DM_IRQ: added irq handler: 000000008b31c398 for: dal_src=74, irq context=1
[ 13.332116] [drm:amdgpu_dm_irq_register_interrupt [amdgpu]] DM_IRQ: added irq handler: 0000000083b3f80f for: dal_src=75, irq context=1
[ 13.332179] [drm:amdgpu_dm_irq_register_interrupt [amdgpu]] DM_IRQ: added irq handler: 000000005856ab47 for: dal_src=76, irq context=1
[ 13.332242] [drm:amdgpu_dm_irq_register_interrupt [amdg
@zrhoffman
zrhoffman / traffic_ops_centos_8.sh
Last active April 2, 2020 14:49
Traffic Ops in CentOS 8
#!/usr/bin/env bash
( trap 'echo "Error on line ${LINENO} of '"$0"'"; exit 1' ERR;
set -o errexit -o nounset;
dnf -y update;
dnf -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm;
dnf -y module disable postgresql;
dnf -y install epel-release patch;
dnf -y --enablerepo=PowerTools install cpanminus expat-devel gcc-c++ golang libpcap-devel mkisofs openssl-devel perl perl-core perl-DBD-Pg perl-DBI perl-Digest-SHA1 libidn-devel libcurl-devel postgresql96 postgresql96-devel perl-JSON perl-libwww-perl perl-Test-CPAN-Meta perl-WWW-Curl perl-TermReadKey perl-Crypt-ScryptKDF;
dnf -y install traffic_ops.rpm;
cd /opt/traffic_ops/app;
@zrhoffman
zrhoffman / trafops_perl_centos_8_deps.sh
Created April 2, 2020 05:42
Install WWW::Curl::Easy and Net::Pcap in CentOS 8
#!/usr/bin/env bash
modules=(WWW::Curl::Easy Net::Pcap);
patches=(http://cpan.cpantesters.org/authors/id/S/SR/SREZIC/patches/WWW-Curl-4.17-RT117793.patch https://src.fedoraproject.org/rpms/perl-Net-Pcap/raw/master/f/Net-Pcap-0.18-Fix-build-with-libpcap-1.9.0.patch);
for index in ${!modules[@]}; do
<<BASH_COMMANDS SHELL=/bin/bash cpanm --local-lib=./local --look ${modules[$index]};
trap 'echo "Error on line \${LINENO} of '"\$0"'"; exit 1' ERR;
set -o errexit -o pipefail;
curl -v '${patches[$index]}' |
patch;
perl Makefile.PL;
@zrhoffman
zrhoffman / routes∕web.php
Last active July 18, 2019 20:18
Laravel route collision problem
<?php
use Illuminate\Support\Facades\Route;
/*
* Routes:
* second/fifth
* third/sixth
*
* ./artisan route:list