Skip to content

Instantly share code, notes, and snippets.

View perfecto25's full-sized avatar

mrx perfecto25

  • NYC
View GitHub Profile
@perfecto25
perfecto25 / backbone_search
Last active March 6, 2018 15:08
k15 Jira backbone sync status search
@perfecto25
perfecto25 / jira-maestro.py
Last active March 8, 2018 21:17
Tornado-based asynchronous web service listener
#!/usr/bin/env python
# coding=utf-8
# JIRA webhook listener "Maestro"
# uses python Tornado scalable web server to handle requests coming
# coming in via webhooks from Jira instance
import tornado.httpserver
import tornado.ioloop
import tornado.options
@perfecto25
perfecto25 / docker_build.sh
Created March 27, 2018 20:28
Docker Build with Splunk logging
#!/bin/bash
# Jira Maestro Docker Build
set -x
APP_ENV="dev"
PORT=5810
IMAGE_VER=$APP_ENV-$(date '+%Y%m%d%H%M%S')
TAG="artifactory.local/jira-maestro"
DEV_HOSTNAME='mrxdev1.vagrant.local'
DEV_IP='14.115.20.166'
@perfecto25
perfecto25 / inject_cert.yaml
Created June 20, 2018 22:03
Ansible playbook to inject a host cert into a CA certs file
# Injects an external cert into 'cacerts'
- hosts: target
vars:
cert_server: ldap.server.company:636 # FQDN
cert_alias: ldap.server
app: myApp
app_install_dir: "/opt/application"
@perfecto25
perfecto25 / terminator_config
Last active August 29, 2018 21:32
Terminator colors ~/.config/terminator/config
[global_config]
window_state = maximise
[keybindings]
[layouts]
[[default]]
[[[child1]]]
parent = window0
type = Terminal
[[[window0]]]
parent = ""
#!/bin/bash
CURR_USER="$(whoami)"
ANACONDA_URL="https://repo.anaconda.com/archive/Anaconda3-5.2.0-Linux-x86_64.sh"
_DB_PASSWORD="airflow992x"
_IP=$(hostname -I | cut -d' ' -f1)
while getopts "a:p:h" opt; do
case $opt in
a) ANACONDA_URL="$OPTARG";;
p) _DB_PASSWORD="$OPTARG";;
@perfecto25
perfecto25 / vscode_settings
Last active October 1, 2018 03:02
VSCode settings
{
"window.zoomLevel": 1,
"workbench.colorTheme": "One Dark Pro",
"http.proxy": "http://xxxx.local:8080",
"http.proxyStrictSSL": false,
"window.menuBarVisibility": "default",
"editor.fontSize": 19,
"editor.fontFamily": "'Inconsolata', 'Droid Sans Mono', 'Courier', 'Droid Sans Fallback'",
"terminal.integrated.fontFamily": "Inconsolata",
@perfecto25
perfecto25 / openvpn_install.sh
Created October 28, 2018 03:49
openvpn installer
#!/bin/bash
# Secure OpenVPN server installer for Debian, Ubuntu, CentOS and Arch Linux
# https://github.com/Angristan/OpenVPN-install
# Verify root
if [[ "$EUID" -ne 0 ]]; then
echo "Sorry, you need to run this as root"
exit 1
@perfecto25
perfecto25 / .bashrc
Last active December 5, 2018 17:55
.bashrc PS1 settings
#!/bin/bash
# Colorize your terminal according to hostname - helps avoid typing wrong commands into PROD!!
termcolorenv() {
HOST=$(echo "${1}" | cut -d'@' -f2)
case $HOST in
qbt* ) PROFILE="PROD" ;;
atlas* ) PROFILE="PROD" ;;
qbch* ) PROFILE="PROD";;
awstestbox ) PROFILE="DEV" ;;
@perfecto25
perfecto25 / bitbucket_branch_cleaner.py
Last active January 11, 2019 18:08
Deletes Pull Requests and Branches from a given repository in BitBucket
#!/usr/bin/env python
# coding=utf-8
# Deletes all branches and pull requests from a Repo unless its 'master' or 'production'
# TO BE USED ON DEV BITBUCKET INSTANCE ONLY!!!
from __future__ import print_function
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)