Skip to content

Instantly share code, notes, and snippets.

View carlwgeorge's full-sized avatar

Carl George carlwgeorge

View GitHub Profile
#!/usr/bin/bash
set -ue
name=$(basename $0)
utils_dir='/home/carl/sync/containers/utils'
if [[ "$name" == "run-image" ]]; then
echo "Don't run this directly, symlink it as the name you want to run."
exit 1
#!/usr/bin/bash
set -xeou pipefail
BASE_IMAGE=registry.fedoraproject.org/fedora
BASE_TAG=31
NAME=f$BASE_TAG
DNFARGS='--setopt install_weak_deps=0 --assumeyes'
# base image
#!/usr/bin/bash
set -xeou pipefail
DNFARGS='--setopt install_weak_deps=0 --assumeyes'
# base image
CONTAINER=$(buildah from --pull-always centos:8)
# utils
@carlwgeorge
carlwgeorge / yum-clean-all-demystified.md
Last active September 24, 2019 14:15
yum clean all demystified

TLDR:

  • yum clean all == clean most
  • rm -rf /car/cache/yum/* == really clean everything

From the man page:

Note that these commands only operate on files in currently enabled
repositories. If you use substitution variables (such as $releasever) in your cachedir configuration, the operation is further restricted to the current
values of those variables.

@carlwgeorge
carlwgeorge / gnome.yml
Last active March 14, 2024 22:16
ansible playbook for my gnome setup
# https://docs.ansible.com/ansible/latest/modules/dconf_module.html
#
# To determine what dconf keys and values to use, you can run `dconf watch /`
# in a terminal as you make changes in settings or tweaks. You can also use
# `dconf read <key>` and `dconf write <key> <value>` to experiment with various
# settings. The dconf-editor application is also useful for exploring various
# keys along with their descriptions.
- hosts: localhost
tasks:
@carlwgeorge
carlwgeorge / jwt-fails.txt
Last active November 5, 2018 03:49
PyJWT test failures
$ pytest-3 -v
========================================================= test session starts ==========================================================
platform linux -- Python 3.7.1, pytest-3.9.2, py-1.5.4, pluggy-0.7.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /root/PyJWT-1.6.4, inifile:
collected 188 items
tests/test_algorithms.py::TestAlgorithms::test_algorithm_should_throw_exception_if_prepare_key_not_impl PASSED [ 0%]
tests/test_algorithms.py::TestAlgorithms::test_algorithm_should_throw_exception_if_sign_not_impl PASSED [ 1%]
tests/test_algorithms.py::TestAlgorithms::test_algorithm_should_throw_exception_if_verify_not_impl PASSED [ 1%]
@carlwgeorge
carlwgeorge / multio-tests.txt
Created October 17, 2018 21:47
multio tests with pytest 3.7.0
# pytest -v multio
========================================== test session starts ===========================================
platform linux -- Python 3.7.0, pytest-3.7.0, py-1.7.0, pluggy-0.7.1 -- /root/multio/.env/bin/python3
cachedir: .pytest_cache
rootdir: /root/multio, inifile:
collected 8 items
multio/tests/test_multio.py::test_initialize[trio] ERROR [ 12%]
multio/tests/test_multio.py::test_initialize[curio] ERROR [ 25%]
multio/tests/test_multio.py::test_initialize[lib2] ERROR [ 37%]
$ python setup.py test
running test
running egg_info
writing Rx.egg-info/PKG-INFO
writing dependency_links to Rx.egg-info/dependency_links.txt
writing top-level names to Rx.egg-info/top_level.txt
reading manifest file 'Rx.egg-info/SOURCES.txt'
writing manifest file 'Rx.egg-info/SOURCES.txt'
running build_ext
test_controlledobservable_simple (test_controlledobservable.TestControlledObservable) ... ok
@carlwgeorge
carlwgeorge / python-example.spec
Last active December 6, 2018 16:26
example python module spec file for Fedora and EPEL
# what it's called on pypi
%global srcname example
# what it's imported as
%global libname %{srcname}
# name of egg info directory
%global eggname %{srcname}
# package name fragment
%global pkgname %{srcname}
%global common_description %{expand:
@carlwgeorge
carlwgeorge / smbios-sys-info-lite_invalid-pointer.txt
Created April 12, 2018 21:11
smbios-sys-info-lite invalid pointer
# smbios-sys-info-lite
Libsmbios: 2.3.3
System ID: 0x0235
Service Tag: 6PSKXQ1
Express Service Code: 14620354489
*** Error in `smbios-sys-info-lite': free(): invalid pointer: 0x0000000000634460 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7c619)[0x7f94c0620619]
smbios-sys-info-lite[0x40ecc2]
smbios-sys-info-lite[0x4067c4]