Skip to content

Instantly share code, notes, and snippets.

View chris1984's full-sized avatar

Chris Roberts chris1984

View GitHub Profile
@djtech42
djtech42 / jekyllServe.sh
Created December 8, 2015 16:52
Run Jekyll Local Server In the Background Without Output to the Console
jekyll serve > /dev/null 2>&1 &
@subfuzion
subfuzion / curl.md
Last active July 4, 2025 22:06
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@zjhuntin
zjhuntin / pr.md
Created April 7, 2016 20:54 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@johnpmitsch
johnpmitsch / generate-hosts.rb
Last active June 25, 2018 14:47
proxy generate virt hosts apache
#!/usr/bin/env ruby
base=50000 #port
range="192.168.121."
contents = <<-EOS
Listen %{port} https
<VirtualHost *:%{port}>
ProxyPass / https://%{ip_address}/
<Location />
@gregjhogan
gregjhogan / random-string-generator.ps1
Last active February 5, 2025 17:14
Generate random string in powershell
#lowercase letters/numbers only
-join ((48..57) + (97..122) | Get-Random -Count 32 | % {[char]$_})
# all characters
-join ((33..126) | Get-Random -Count 32 | % {[char]$_})

Cobbler on EL7

Installing the software

Install of the stuff you need, and maybe some of the stuff you don't.

yum install epel-release -y
yum install cobbler cobbler-web pykickstart fence-agents-all git nc dhcp xinetd
@johnpmitsch
johnpmitsch / gist:1a53869c2fcacec357723e99707a51dd
Last active June 11, 2019 15:43
change notification interval in foreman
in foreman dir update:
webpack/assets/javascripts/react_app/redux/actions/notifications/index.js:const getNotificationsInterval
or
export NOTIFICATIONS_POLLING=99999999
export NOTIFICATIONS_POLLING=99999999; export TASKS_BULK_SEARCH_INTERVAL=99999999
foreman start
@johnpmitsch
johnpmitsch / workaround.md
Created May 31, 2017 14:08
Workaround for foreman/katello npm install error

error

node: error while loading shared libraries: libhttp_parser.so.2: cannot open shared object file: No such file or directory

workaround

yum remove -y nodejs* npm
yum clean all
rpm -qa 'node|npm' | grep -v nodesource #should return no packages 
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -
- yum install docker
- in /etc/sysconfig/docker
OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false --debug=true -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock'
- service docker restart
- In satellite/katello create a new compute resource with the followiung settings
Provider Docker
URL http://0.0.0.0:2375
# EG : ALTER USER Postgres WITH PASSWORD '<newpassword>';
CP_PASS=`grep jpa.config.hibernate.connection.password /etc/candlepin/candlepin.conf | awk -F= '{print $2}'`
F_PASS=`grep password /etc/foreman/database.yml | awk -F: '{print $2}' | sed 's/"//g'`
echo "ALTER USER candlepin WITH PASSWORD '$CP_PASS';" | sudo -u postgres psql
echo "ALTER USER foreman WITH PASSWORD '$F_PASS';" | sudo -u postgres psql