Skip to content

Instantly share code, notes, and snippets.

@zrhoffman
zrhoffman / Dockerfile
Last active Dec 17, 2020
linux/arm64 golang on alpine
View Dockerfile
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
View trafficvault.log
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
dmesg with drm.debug=0xf
View dmesg-drm.debug=0xf.log
[ 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 Apr 2, 2020
Traffic Ops in CentOS 8
View traffic_ops_centos_8.sh
#!/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 Apr 2, 2020
Install WWW::Curl::Easy and Net::Pcap in CentOS 8
View trafops_perl_centos_8_deps.sh
#!/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 Jul 18, 2019
Laravel route collision problem
View routes∕web.php
<?php
use Illuminate\Support\Facades\Route;
/*
* Routes:
* second/fifth
* third/sixth
*
* ./artisan route:list