Skip to content

Instantly share code, notes, and snippets.

View ianballou's full-sized avatar

Ian Ballou ianballou

View GitHub Profile
@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:
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

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

@jackblk
jackblk / squid_proxy_tutorial.md
Last active February 12, 2025 15:36
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
@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"
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 / importing_older_postgresql_data.sh
Last active September 21, 2020 18:24
importing older postgresql
#mount large filesystem (200GB) onto /mnt/
setenforce 0
cd /mnt/
tar -xzf pgsql_data.tar.gz
#link /var/lib/pgsql from /mnt
@jeremylenz
jeremylenz / hammer-hack.sh
Last active August 7, 2024 16:24
steal partha's hammer settings and get hammer working on devel box
cd ~/hammer-cli-katello
bundle install
bundle exec bash
cd ~
wget https://partha.fedorapeople.org/devel/hammer.tgz
tar zxf hammer.tgz
ll .hammer # verify there's stuff in that dir
cd hammer-cli-katello
hammer ping
@johnpmitsch
johnpmitsch / w.md
Last active June 28, 2021 21:05
Katello dev server hacky wepback workaround

go to node_modules/webpack-dev-server/lib/Server.js in ~/foreman

around line 496 change protocols: ['h2', 'http/1.1'] to protocols: ['http/1.1'] (remove h2 from the array)

start dev server

NOTE: this will be overwritten when you npm install again

@jjeffers
jjeffers / smart_proxy_container_gateway_setup.md
Last active April 16, 2021 11:46
proxy devel pulpcore smart proxy container gateway setup for testing plugin

On the proxy:

  • yum group install "Development Tools"

  • yum install rh-ruby27-ruby-devel

  • scl enable tfm bash

  • yum install sqlite-dev

  • gem install sqlite

  • gem build smart_proxy_container_gateway.gemspec

  • gem install smart_proxy_container_gateway-x.x.x.gem

  • edit /etc/foreman-proxy/settings.d/container_gateway.yml: