Skip to content

Instantly share code, notes, and snippets.

View tbielawa's full-sized avatar
💭
bitmath!

Tim Bielawa tbielawa

💭
bitmath!
View GitHub Profile
@abutcher
abutcher / magic.md
Last active November 28, 2017 16:19

Edit your network and add your domain (<domain name='example.com' localOnly='yes'/>) to the network definition. All of your hosts using this network must have hostnames (hostnamectl set-hostname) within the domain.

sudo virsh net-edit default
<network>
  <name>default</name>
  <uuid>a4879b25-1c92-49d6-986b-e9e2cde27678</uuid>

OpenShift Named Certificates

This is a short guide explaining how to deploy and manage custom certificates via openshift-ansible. These custom certificates will be served for public facing UI/API.

1. Set up

NOTE: I'm running ansible from the first master so I'm creating the certificates in /root/ on my first master. The certificates will be copied to the masters (within /etc/origin/master/named_certificates/) by ansible. I could create them on my local system and run ansible from my local system instead.

1.1 Create CA Certificate

#!/usr/bin/env python
import click
from glob import glob
import graphviz as gv
import os
import sys
import yaml
''' Generate a directed graph of ansible role dependencies.
@santa4nt
santa4nt / ioctl.py
Last active May 28, 2023 11:31
A Python-ctypes script to dispatch IOCTL in Windows
#!C:\Python27\python.exe
# The MIT License (MIT)
#
# Copyright © 2014-2016 Santoso Wijaya <[email protected]>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sub-license, and/or sell copies of the Software,
@aculich
aculich / forwarder.py
Created November 28, 2011 07:52
SSHForwarder class for use with the python ssh module: http://pypi.python.org/pypi/ssh
#!/usr/bin/env python
# This code is licensed according to the main package that it depends on:
# http://pypi.python.org/pypi/ssh
# License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
# http://www.gnu.org/licenses/lgpl.html
import sys, os, os.path
import select
import SocketServer