Skip to content

Instantly share code, notes, and snippets.

View david-drinn's full-sized avatar

David Drinnan david-drinn

  • Benchmark Electronics Inc
  • Phoenix, AZ
View GitHub Profile

General OpenSSL Commands

These commands allow you to generate CSRs, Certificates, Private Keys and do other miscellaneous tasks.

  • Generate a new private key and Certificate Signing Request
openssl req -out CSR.csr -new -newkey rsa:2048 -nodes -keyout privateKey.key
  • Generate a self-signed certificate (see How to Create and Install an Apache Self Signed Certificate for more info)
@david-drinn
david-drinn / Jenkinsfile
Created October 6, 2020 20:39 — forked from JCotton1123/Jenkinsfile
Sample Jenkinsfile for Python project
pipeline {
options {
buildDiscarder(logRotator(numToKeepStr: '10')) // Retain history on the last 10 builds
ansiColor('xterm') // Enable colors in terminal
timestamps() // Append timestamps to each line
timeout(time: 20, unit: 'MINUTES') // Set a timeout on the total execution time of the job
}
agent {
// Run this job within a Docker container built using Dockerfile.build
// contained within your projects repository. This image should include
@david-drinn
david-drinn / layer.conf
Created April 29, 2020 15:33 — forked from parthitce/layer.conf
meta-babelouest : Yocto recipes for babelouest softwares
# We have a conf and classes directory, add to BBPATH
BBPATH .= ":${LAYERDIR}"
# We have a recipes-* directories, add to BBFILES
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
${LAYERDIR}/recipes-*/*/*.bbappend"
BBFILE_COLLECTIONS += "babelouest"
BBFILE_PATTERN_babelouest = "^${LAYERDIR}/"
BBFILE_PRIORITY_babelouest = "6"
/**
* Explore plugin.
*/
Draw.loadPlugin(function(ui)
{
// Adds resource for action
mxResources.parse('exploreFromHere=Explore from here...');
// Max number of edges per page
var pageSize = 20;
@david-drinn
david-drinn / gist:eeb2916c21cb08c8b7f2df704e5d7b34
Created December 5, 2019 15:44 — forked from simonw/gist:104413
Turn a BeautifulSoup form in to a dict of fields and default values - useful for screen scraping forms and then resubmitting them
def extract_form_fields(self, soup):
"Turn a BeautifulSoup form in to a dict of fields and default values"
fields = {}
for input in soup.findAll('input'):
# ignore submit/image with no name attribute
if input['type'] in ('submit', 'image') and not input.has_key('name'):
continue
# single element nome/value fields
if input['type'] in ('text', 'hidden', 'password', 'submit', 'image'):