Skip to content

Instantly share code, notes, and snippets.

@anthonyinfinity
anthonyinfinity / mk-venv.sh
Created July 5, 2020 09:33
Create a pyenv virtual venv in the current directory
#!/bin/sh
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
# Usage: $ sh mk-venv
if [[ -z "${1}" ]]; then
echo "Usage: $ mk-venv pythonversion"
exit 1
fi
### Linux ###
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
#!/usr/bin/env bash
subscription-manager repos --enable rhel-7-server-optional-rpms \
--enable rhel-server-rhscl-7-rpms
yum -y install @development
yum -y install rh-python36
scl enable rh-python36 bash
yum install ansible
ansible --version
@anthonyinfinity
anthonyinfinity / newarproj
Last active March 27, 2020 00:14
New ansible role. Add it to /usr/local/bin/newarproj and sh newarproj.sh pythonversion projectname to init a role dir.
#!/bin/sh
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
# Usage: $ sh newarproj.sh pythonversion projectname
molecule init role -r $2 && \
cd $2 && CURDIR=$(PWD)\
pyenv local $1 && \
pyenv virtualenv venv-$2 && \
pyenv local venv-$2 && \
@anthonyinfinity
anthonyinfinity / base-role-requirements.txt
Last active May 4, 2020 12:22
base-ansible-role-requirements.txt
molecule
docker
pre-commit
ansible
ansible-lint
flake8
flake8-docstrings
yamllint
testinfra
docker
@anthonyinfinity
anthonyinfinity / Vagrantfile
Created February 21, 2019 12:37
vagrantfile for centos, solaris, windows and aws ami
Vagrant.configure("2") do |config|
config.vm.define "amihost", primary: true do |amihost|
amihost.vm.provision "shell", path: "scripts/yum-apt-startup.sh"
amihost.vm.box = "mwhooker/amazon-linux"
amihost.vm.hostname = 'amihost'
amihost.vm.network :private_network, ip: "192.168.56.105"
amihost.vm.network :forwarded_port, guest: 22, host: 10122, id: "ssh"
amihost.vm.provider :virtualbox do |v|
# cat << EOF > /dev/null
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# /!\ do not edit this file
# instead, override settings in ~/.tmux.conf.local, see README.md
# -- general -------------------------------------------------------------------