Skip to content

Instantly share code, notes, and snippets.

@ygorth
ygorth / centos_python_dev_env_setup
Last active July 24, 2022 13:26 — forked from iDevPy/centos_python_env_setup
CentOS 7: Install Python 3.6.1, pip, virtualenv, and virtualenvwrapper
#!/bin/bash
#####################################################################
## IMPORTANT ##
# Run this script with root (sudo su -), wont work if run as sudo.
# Change the variables as needed.
######################################################################
USER=youruser # User that will have ownership (chown) to /usr/local/bin and /usr/local/lib
USERHOME=/home/${USER} # The path to the users home, in this case /home/youruser
PYSHORT=3.6 # The Python short version, e.g. easy_install-${PYSHORT} = easy_install-3.6
PYTHONVER=3.6.1 # The actual version of python that you want to download from python.org
@ygorth
ygorth / pedantically_commented_playbook.yml
Created January 8, 2016 18:21 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@ygorth
ygorth / git-clearHistory
Last active July 13, 2018 20:55 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init && git add . && git status
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git
git push -u --force origin master
@ygorth
ygorth / restore-git-submodules.sh
Created November 28, 2017 20:32 — forked from aroemen/restore-git-submodules.sh
Restore git submodules from .gitmodules. Since git submodule init only considers submodules that already are in the index (i.e. "staged") for initialization this short script parses .gitmodules, and each url and path pair.
#!/bin/sh
set -e
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' |
while read path_key path
do
url_key=$(echo $path_key | sed 's/\.path/.url/')
url=$(git config -f .gitmodules --get "$url_key")
git submodule add $url $path
@ygorth
ygorth / login-background.sh
Created May 23, 2018 02:10 — forked from jjvillavicencio/login-background.sh
Genome Login Background
WORKDIR=~/tmp/gdm-login-background
GST=/usr/share/gnome-shell/gnome-shell-theme.gresource
GSTRES=$(basename $GST)
mkdir -p $WORKDIR
cd $WORKDIR
mkdir theme
for r in `gresource list $GST`; do
gresource extract $GST $r >$WORKDIR$(echo $r | sed -e 's/^\/org\/gnome\/shell\//\//g')
@ygorth
ygorth / aws-cfn-bootstrap-centos7.sh
Last active August 22, 2018 16:13 — forked from JetFault/aws-cfn-bootstrap-centos7.sh
aws-cfn-bootstrap for CentOS 7
yum install -y epel-release
yum install -y python-pip
cd /usr/bin
pip install pystache
pip install argparse
pip install python-daemon
pip install requests
cd /opt
@ygorth
ygorth / list.txt
Created May 17, 2023 23:04 — forked from shortjared/list.txt
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com