Skip to content

Instantly share code, notes, and snippets.

View JacobCallahan's full-sized avatar
🧐
🥓

Jake Callahan JacobCallahan

🧐
🥓
View GitHub Profile
@JacobCallahan
JacobCallahan / bash things.txt
Created August 24, 2017 17:48
useful bash commands
1. Rename all files that start with a single _ to start with a single .
find . -type f -name "_[^_]*" -exec rename _ . {} \;
Agema
Tubach
Holborn
Jagi
Warmind
Cayde
Draksis
Wintership
Cryptarch
Ahamkara
@JacobCallahan
JacobCallahan / .bashrc
Last active August 29, 2024 19:05
public
# .bashrc
# If the shell is not running interactively, immediately return. This ensures
# that programs like scp are given a pristine environment.
[[ $- != *i* ]] && return
export TERM=gnome-256color
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
if [ -f `which powerline-daemon` ]; then
powerline-daemon -q
Adonna
Agah
Agema
Ahamkara
Aiat
Aksis
Aksor
AlakHul
Alzok
Amytis
@JacobCallahan
JacobCallahan / docker-flood.py
Last active August 19, 2017 17:58
Rapidly deploy as many docker content hosts as you want, without having to worry about taking down old containers.
import argparse
from collections import deque
from time import time
import docker
def rm_container(client, containers):
del_container = containers.popleft()
client.remove_container(del_container['container'], v=True, force=True)
print ('Done with container #{0}'.format(del_container['number']))
@JacobCallahan
JacobCallahan / buildem.sh
Last active March 1, 2018 19:46
Used to build RHEL 6, 7.2, 7.4 content host images as well as download suse images to be used in Satellite 6 testing.
#!/bin/bash
git clone https://github.com/JacobCallahan/content-host-d.git
cd content-host-d
eho "Building rhel images"
for i in rhel6 rhel7 rhel74; do
git checkout $i
docker build -t ch-d:$i .
done
echo "Downloading sles images"
for i in sles11 sles12 suse; do
@JacobCallahan
JacobCallahan / genvirt.py
Last active February 4, 2021 16:27
generate virt-who esx json data
import argparse
import json
import uuid
def gen_json(hypervisors, guests):
virtwho = {}
hypervisor_list = []
for i in range(hypervisors):
guest_list = []
@JacobCallahan
JacobCallahan / gencerts.sh
Last active August 15, 2018 14:28
Satellite certificate generator script
#! /bin/bash
if [ -n "$1" ]; then
name=$1
else
name=$(hostname)
fi
git clone https://github.com/iNecas/ownca.git
cd ownca
yes "" | ./generate-ca.sh
yes | ./generate-crt.sh $name
# -*- encoding: utf-8 -*-
"""Genetic algorithm base classes."""
import random
from collections import deque
from itertools import izip
import attr
@attr.s()
class Population(object):