Skip to content

Instantly share code, notes, and snippets.

View carlwgeorge's full-sized avatar

Carl George carlwgeorge

View GitHub Profile
  • setup.py
'Just increment the number and create a new lib. Never fix the original one.'
from distutils.core import setup
setup(name='urllib5', version='5.0.0', author='Thomas Perl <m@thp.io>',
        description=__doc__, py_modules=['urllib5'])
  • urllib5.py
from urllib import *
import rpm
# optionally set an alternate gpg path
#rpm.addMacro('_gpg_path', '/other/gpg/path')
# set this macro to the key name or fingerprint
rpm.addMacro('_gpg_name', 'my key')
# sign it
rpm.addSign('foo.rpm', 'super secret gpg passphrase')
@carlwgeorge
carlwgeorge / github-pr.py
Created August 23, 2017 19:17
Convert GitHub issue into a pull request.
#!/usr/bin/env python3
import re
import subprocess
import appdirs
import click
import requests
import yaml
# Which one is better?
# option A
ExclusiveArch: %{go_arches}
ExcludeArch: s390x
# option B
%if 0%{?rhel}
ExclusiveArch: x86_64 aarch64 ppc64le
%else

spec file

%config(noreplace) %{_sysconfdir}/recap
%config(noreplace) %{_sysconfdir}/recap.conf

unedited config

before upgrade:

dataset:

names = ['John', 'Mary', 'Sue', 'Jill', 'Garth', 'Jack', 'Jennifer']

before:

names_that_start_with_j = []
@carlwgeorge
carlwgeorge / rhel7-mysql-options.md
Created January 11, 2018 21:13
RHEL 7 MySQL options
@carlwgeorge
carlwgeorge / rhel-7.5-beta.txt
Created January 26, 2018 22:39
RHEL 7.5 beta release notes
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7-beta/html/7.5_release_notes/index
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7-beta/html/7.5_release_notes/new_features_authentication_and_interoperability#BZ1470048
samba 4.6.2 > 4.7.1
smb protocol 3 by default
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7-beta/html/7.5_release_notes/new_features_compiler_and_tools#BZ1460249
nmap 6.40 > 7.50
(ncat) The -z option for quickly checking the status of a port has been added.