This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
ph = "!git push $(whoami) HEAD --set-upstream --quiet" | |
pr = "!hub pull-request" | |
phr = "!git ph && git pr" | |
[url "git@github.com:theforeman/"] | |
pushInsteadOf = "ghf:" | |
[url "https://github.com/theforeman/"] | |
insteadOf = "ghf:" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat modules/puppet-*/metadata.json | jq '.operatingsystem_support[].operatingsystem' | sort | uniq -c | sort -h | |
jq: error (at <stdin>:120): Cannot iterate over null (null) | |
jq: error (at <stdin>:1725): Cannot iterate over null (null) | |
jq: error (at <stdin>:2048): Cannot iterate over null (null) | |
jq: error (at <stdin>:5360): Cannot iterate over null (null) | |
1 "CloudLinux" | |
1 "Darwin" | |
1 "DragonFly" | |
1 "NetBSD" | |
1 "PCS" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'librarian/puppet' | |
librarian_environment = Librarian::Puppet::Environment.new(pwd: 'Puppetfile.lock') | |
librarian_environment.lock.manifests.sort_by { |manifest| manifest.name.split('-').last }.each do |manifest| | |
puts "#{manifest.name.split('-').last} #{manifest.version}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"username": "admin", | |
"password": "changeme", | |
"name": "Admin User" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Requires Python 3.7 for dataclasses | |
import argparse | |
import json | |
from dataclasses import dataclass | |
@dataclass(eq=True, frozen=True, order=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# This script wraps curl with the right connection details so you don't need to | |
# care about it. | |
# | |
# The first argument is the path on the host, including the first slash: | |
# | |
# ./fp-curl /features | |
# ./fp-curl /v2/features | jq . | |
# ./fp-curl /puppet/ca/host.example.com -X DELETE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'librarian/puppet' | |
librarian_environment = Librarian::Puppet::Environment.new(pwd: 'Puppetfile.lock') | |
librarian_environment.lock.manifests.sort_by { |manifest| manifest.name.split('-').last }.each do |manifest| | |
author, name = manifest.name.split('-') | |
if ['theforeman', 'katello'].include?(author) | |
branch = "#{manifest.version.to_s.split('.')[0..1].join('.')}-stable" | |
puts "puppet-#{name} #{branch} #{manifest.version}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
PACKAGE="$1" | |
SOURCE_DIR="${2:-${HOME}/dev/${PACKAGE}}" | |
if [[ -z $PACKAGE ]] ; then | |
echo "Usage: $0 PACKAGE" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./get_package_names foreman-release | |
foreman-nightly-nonscl-rhel7 foreman-release-1.22.0-0.1.develop.el7 | |
foreman-client-nightly-rhel5 foreman-release-1.22.0-0.1.develop.el5 | |
foreman-client-nightly-rhel6 foreman-release-1.22.0-0.1.develop.el6 | |
foreman-client-nightly-fedora27 foreman-release-1.22.0-0.1.develop.fc27 | |
foreman-client-nightly-fedora28 foreman-release-1.22.0-0.1.develop.fc28 | |
$ ./get_package_names --dist el7 foreman-release | |
foreman-nightly-nonscl-rhel7 foreman-release-1.22.0-0.1.develop.el7 | |
$ ./get_package_names foreman-release rubygem-foreman_templates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import json | |
def normalize_name(module): | |
full_name = module.replace('-', '/', 1).lower() | |
author, name = full_name.split('/', 1) | |
return name if author in ('theforeman', 'katello') else full_name |