Skip to content

Instantly share code, notes, and snippets.

View setenv.sh
#
# Cutom Environment Variables for Tomcat
#
############################################
export JAVA_HOME=/usr/lib/jvm/java-7-oracle/jre
export PATH=${JAVA_HOME}/bin:${PATH}
############################################
#
# JAVA_OPTS
@patmandenver
patmandenver / install_java_scala_sbt.sh
Last active Apr 15, 2021
Script to install Oracle Java 1.8, Scala 2.11.7 and sbt 0.13.9 on Ubuntu 14.04
View install_java_scala_sbt.sh
#!/bin/bash
#
# Script to Install
# Oracle Java 1.8
# Scala 2.11.7
# sbt 0.13.9
#
##############################
#Script must be run as root/sudo
@patmandenver
patmandenver / scp-speed-test.sh
Last active Apr 3, 2021
scp speed test between servers
View scp-speed-test.sh
#!/bin/bash
# scp-speed-test.sh
#
# Usage:
# ./scp-speed-test.sh user@hostname [test file size in MBs]
#
#############################################################
ssh_server=$1
test_file=".scp-test-file"
@patmandenver
patmandenver / le-renew-haproxy
Last active Feb 14, 2021
Script for autorenewing Let'sEncyrpt certs for an Haproxy box
View le-renew-haproxy
#!/bin/bash
#
# Let's Encrypt HAProxy script
#
###################################
DOMAINS=(
"foo.example.com"
"bar.example.com"
)
View pvc_pipe.scad
//
// Created by Patrick Bailey iQless.com :)
//
///////////////////////////////////////////
$fn=200;
inner_dia = 33.7;
outer_dia = 44;
hole_depth = 30;
angle=5;
View picture_frame.scad
thickness=1;
text_01="Christmas";
text_01_y=60;
text_02="2007";
text_02_y=30;
myFont="Revamped:style=Regular";
fontSize=18;
View createjson_from_xslx_multiple_sheet.py
#!/usr/bin/env python3
import openpyxl
import json
from openpyxl import load_workbook
def get_sheet_dict(ws):
year_dict = {}
column_headers = {}
View split_up_stl.scad
$fn=100;
grand_teton="grand_tetons.stl";
adjust=[0,0,2]; // X,Y,Z adjustments
just_display=false; //Set to false to split
split=true;//Set to false to adjust
//Split size in mm
edge=20;
//split per side
View createxls_from_json_multiple_sheets.py
#!/usr/bin/env python3
import openpyxl
import json
from openpyxl import Workbook
from openpyxl.styles import numbers
from openpyxl.utils import get_column_letter
header_dict = { "1": "Month",
@patmandenver
patmandenver / webserver.py
Created Feb 17, 2016
Python SimpleHTTPServer with header outputs
View webserver.py
#!/usr/bin/python
#
# Author: Patrick Bailey
# Twitter: @whiteboardoder
#
#The MIT License (MIT)
#
#Copyright (c) 2016 "whiteboardcoder" Patrick Bailey
#
#Permission is hereby granted, free of charge, to any person obtaining a copy