Skip to content

Instantly share code, notes, and snippets.

View ianballou's full-sized avatar

Ian Ballou ianballou

View GitHub Profile
Install dynaconf 3 and update /etc/pulp/settings.py
sudo systemctl stop pulpcore*
sudo su - postgres
dropdb pulp -p 7878
createdb pulp -p 7878
exit
cd /usr/local/lib/pulp/src/pulpcore/
sudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' DJANGO_SETTINGS_MODULE='pulpcore.app.settings' /usr/local/lib/pulp/bin/django-admin migrate --no-input
sudo -u pulp PULP_SETTINGS='/etc/pulp/settings.py' DJANGO_SETTINGS_MODULE='pulpcore.app.settings' /usr/local/lib/pulp/bin/django-admin reset-admin-password --password password
@jlsherrill
jlsherrill / test_applicability_timing.rb
Created May 20, 2020 20:12
Test katello applicability timing
Setting[:applicability_batch_size] = 50
number_of_calculations = 1000
total_host_count = Katello::Host::ContentFacet.count
RUNNING_TASK_LABEL = "Actions::Katello::Host::GenerateApplicability"
@jackblk
jackblk / squid_proxy_tutorial.md
Last active January 10, 2026 03:03
Tutorial on how to setup a squid proxy with authentication.

Note

This tutorial is for Ubuntu & Squid3. Use AWS, Google cloud, Digital Ocean or any services with Ubuntu to follow this tutorial.

Install squid & update

sudo apt-get update
sudo apt-get install squid3
sudo apt-get install apache2-utils

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

This is a basic example of using SOCKS.
From the computer you want to browse on you'll make an ssh connection to the computer you want to browse from.
In this example it'll be my laptop connecting to my desktop.
Run: ssh -D <port, I use 10000> <user>@<hostname of desktop>
Now, in a browser you don't normally use (I'm using firefox), go to network proxy.
Set Manual porxy configuration
@fernandoaleman
fernandoaleman / rpm-digital-signature.sh
Created November 18, 2011 15:18
How to sign your custom RPM package with GPG key
# How to sign your custom RPM package with GPG key
# Step: 1
# Generate gpg key pair (public key and private key)
#
# You will be prompted with a series of questions about encryption.
# Simply select the default values presented. You will also be asked
# to create a Real Name, Email Address and Comment (comment optional).
#
# If you get the following response: