Skip to content

Instantly share code, notes, and snippets.

@bish0polis
bish0polis / Vagrantfile
Created December 15, 2022 19:21
vagrantfile for building snipe-it and installing locally
# -*- mode: ruby -*-
# vi: set ft=ruby :
$repos = <<-REPOS
yum-config-manager --add-repo=https://rpms.remirepo.net/enterprise/7/remi/x86_64/ # no typo
yum-config-manager --save --setopt=rpms.remirepo.net_enterprise_7_remi_x86_64_.installpkgs=composer
yum upgrade -y --skip-broken
REPOS
# Cookbook Name:: ohai
# Plugin:: llpd
#
# "THE BEER-WARE LICENSE" (Revision 42):
# <john@dewey.ws> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return John-B Dewey Jr.
#
# renovated a bit by bishopolis@gmail.com, who also enjoys certain beers.
#
@bish0polis
bish0polis / dammit-rh-fix-satellite-dammit.diff
Created September 9, 2021 20:25
How to overcome the "undefined method `any?' for nil:NilClass" error when mirroring EL8 repos with the frail pulp tool in the junky satellite6
diff -uBb /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/app/services/katello/pulp/repository/yum.rb\~ /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/app/services/katello/pulp/repository/yum.rb
--- /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/app/services/katello/pulp/repository/yum.rb~ 2021-07-06 05:54:49.000000000 -0700
+++ /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.18.1.33/app/services/katello/pulp/repository/yum.rb 2021-09-09 13:08:36.456417249 -0700
@@ -152,7 +152,7 @@
def self.distribution_bootable?(distribution)
# Not every distribution from Pulp represents a bootable
# repo. Determine based on the files in the repo.
- distribution["files"].any? do |file|
+ [*distribution["files"]].any? do |file|
if file.is_a? Hash
# fix up ohai for post-centos EL8
%post
sed -i~ '
/clearos/s:when /oracle/:when /rocky/, /oracle/:
' \
/opt/chef/embedded/lib/ruby/gems/2.*/gems/ohai-*/lib/ohai/plugins/linux/platform.rb
%end
# easy once you know where to look
@bish0polis
bish0polis / wkhtmltopdf-in-xvfb-on-centos7.md
Last active January 15, 2020 23:05
wkhtmltopdf centos 7 headless with xvfb

wkhtmltopdf centos 7 headless with xvfb

Install and run standalone Xvfb

yum install xorg-x11-server-Xvfb
yum install xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi
# from EPEL; 12.3 has exploits, and this is easier
yum install wkhtmltopdf 

Keybase proof

I hereby claim:

  • I am bish0polis on github.
  • I am bishopolis (https://keybase.io/bishopolis) on keybase.
  • I have a public key ASD6_gbOBVERIHh98u96Ry3KutQzTBKBeFPbB1woYeQH-wo

To claim this, I am signing this object:

@bish0polis
bish0polis / free.chef.diff
Last active June 1, 2019 23:02
Protect your gear from the trapdoor licensing in chef .
diff --git a/cust-cookbooks/all-datacenter-attributes/attributes/yum-lock.rb b/cust-cookbooks/all-datacenter-attributes/attributes/y\
um-lock.rb
new file mode 100644
index 0000000..30ae81a
--- /dev/null
+++ b/cust-cookbooks/all-datacenter-attributes/attributes/yum-lock.rb
@@ -0,0 +1,25 @@
+#
+# Cookbook Name:: all-datacenter-attributes