Skip to content

Instantly share code, notes, and snippets.

Avatar
🤠
Yeehaw.

Major Hayden major

🤠
Yeehaw.
View GitHub Profile
View metar_weather.py
#!/usr/bin/env python
import json
from metar import Metar
import metpy.calc as mpcalc
from metpy.units import units
import requests
observation_station = "KRND"
alerts_zone = "TXZ207"
@major
major / metar_weather.py
Created Apr 22, 2020
Weather via METAR for i3wm status bar
View metar_weather.py
#!/usr/bin/env python
import json
from metar import Metar
import metpy.calc as mpcalc
from metpy.units import units
import requests
alerts_zone = "TXZ207"
View gist:83db5d3a30521a9e259fec49948a8a69
TASK [osbuild : Debug] *********************************************************
Friday 21 February 2020 17:02:40 +0000 (0:00:00.291) 0:03:35.740 *******
ok: [osbuild.ci.43079897] =>
msg:
- /opt/osbuild-composer/output/x86_64/golang-github-osbuild-composer-tests-5-1.fc31.x86_64.rpm
- /opt/osbuild-composer/output/x86_64/golang-github-osbuild-composer-tests-debuginfo-5-1.fc31.x86_64.rpm
- /opt/osbuild-composer/output/x86_64/golang-github-osbuild-composer-worker-5-1.fc31.x86_64.rpm
- /opt/osbuild-composer/output/x86_64/golang-github-osbuild-composer-worker-debuginfo-5-1.fc31.x86_64.rpm
- /opt/osbuild-composer/output/x86_64/golang-github-osbuild-composer-debugsource-5-1.fc31.x86_64.rpm
- /opt/osbuild-composer/output/x86_64/golang-github-osbuild-composer-debuginfo-5-1.fc31.x86_64.rpm
@major
major / srpm.patch
Last active Mar 19, 2019
Proposed source RPM build patch
View srpm.patch
From 1282efe390e43a208e33ad83faefde2e58ce0ed7 Mon Sep 17 00:00:00 2001
From: Major Hayden <major@redhat.com>
Date: Tue, 19 Mar 2019 09:27:29 -0500
Subject: [PATCH] Add source RPM package build
Some developers use build systems, such as Koji, that accept source RPMs
and compile those packages. This patch adds a quick way for a developer
to generate a basic source RPM from a kernel tree.
Signed-off-by: Major Hayden <major@redhat.com>
@major
major / gist:021951d912d05d4323ee7e32b0ce551f
Created Mar 18, 2019
Traffic just prior to Pixel 3 wifi drops
View gist:021951d912d05d4323ee7e32b0ce551f
07:26:06.736900 IP6 2607:f8b0:4000:80d::2003.443 > phone.41310: Flags [F.], seq 3863, ack 511, win 114, options [nop,nop,TS val 1288800272 ecr 66501414], length 0
07:26:06.743101 IP6 2607:f8b0:4000:80d::2003.443 > phone.41312: Flags [F.], seq 3864, ack 511, win 114, options [nop,nop,TS val 1778536228 ecr 66501414], length 0
07:26:06.765444 IP6 phone.41312 > 2607:f8b0:4000:80d::2003.443: Flags [R], seq 4183481455, win 0, length 0
07:26:06.765454 IP6 phone.41310 > 2607:f8b0:4000:80d::2003.443: Flags [R], seq 3279990707, win 0, length 0
07:26:07.487180 IP6 2607:f8b0:4000:80d::2003.443 > phone.41316: Flags [F.], seq 3863, ack 511, win 114, options [nop,nop,TS val 4145292968 ecr 66501639], length 0
07:26:07.537080 IP6 phone.41316 > 2607:f8b0:4000:80d::2003.443: Flags [R], seq 4188442452, win 0, length 0
View i3-get-window-criteria.sh
#!/bin/sh
# Source: https://faq.i3wm.org/question/2172/how-do-i-find-the-criteria-for-use-with-i3-config-commands-like-for_window-eg-to-force-splashscreens-and-dialogs-to-show-in-floating-mode.1.html
# i3-get-window-criteria - Get criteria for use with i3 config commands
# To use, run this script, then click on a window.
# Output is in the format: [<name>=<value> <name>=<value> ...]
# Known problem: when WM_NAME is used as fallback for the 'title="<string>"' criterion,
# quotes in "<string>" are not escaped properly. This is a problem with the output of `xprop`,
# reported upstream: https://bugs.freedesktop.org/show_bug.cgi?id=66807
@major
major / openshift_cpu_count.sh
Created Oct 12, 2018
Getting accurate cgroup CPU core counts in OpenShift
View openshift_cpu_count.sh
CPU_SHARES=$(cat /sys/fs/cgroup/cpu/cpu.shares)
export RPM_BUILD_NCPUS=$(expr $CPU_SHARES / 1024)
View gist:446ce7c38ee08ce5527ec10b5ab42508
sh-4.2$ ls -alR /sys/fs/cgroup/
/sys/fs/cgroup/:
total 0
drwxr-xr-x. 13 root root 340 May 21 15:27 .
drwxr-xr-x. 6 root root 0 May 21 15:27 ..
drwxr-xr-x. 2 root root 0 May 21 15:27 blkio
lrwxrwxrwx. 1 root root 11 May 21 15:27 cpu -> cpuacct,cpu
lrwxrwxrwx. 1 root root 11 May 21 15:27 cpuacct -> cpuacct,cpu
drwxr-xr-x. 2 root root 0 May 21 15:27 cpuacct,cpu
drwxr-xr-x. 2 root root 0 May 21 15:27 cpuset
@major
major / icanhazip.log
Created Mar 5, 2018
Top 50 WordPress versions querying icanhazip.com on 2018-02-28
View icanhazip.log
2822666 WordPress/4.9.4;
619046 WordPress/4.9.3;
428958 WordPress/4.8.5;
153232 WordPress/4.7.9;
100260 WordPress/4.2.19;
93623 WordPress/4.9.1;
92693 WordPress/4.9.2;
78251 WordPress/4.6.10;
60564 WordPress/4.8.3;
49401 WordPress/4.3.15;
@major
major / pike-reno-analysis.rst
Created Nov 29, 2017
OSA Pike Reno Analysis
View pike-reno-analysis.rst

Pike Release Note Analysis

Major Hayden, Nov 2017

Availability

  • Keystone rolling upgrade status checks are available