Skip to content

Instantly share code, notes, and snippets.

View jwreagor's full-sized avatar

J R jwreagor

  • New Gillington, WI
View GitHub Profile
@jwreagor
jwreagor / jenkins-set-credis.groovy
Created February 9, 2017 03:43 — forked from hgomez/jenkins-set-credis.groovy
Jenkins Groovy script to set CredentialsId
import hudson.model.*
import hudson.maven.*
import hudson.tasks.*
import hudson.scm.*
def match_url = "http://svn.mycorp.com/svn/devops"
for(item in Hudson.instance.items) {
hasClaim = false;
if (item.scm instanceof SubversionSCM)
@jwreagor
jwreagor / workflow.groovy
Created February 9, 2017 03:08 — forked from cyrille-leclerc/workflow.groovy
W-JAX 14- Pimp Your Continuous Delivery Pipeline with the New Jenkins Workflow Engine
def qaCatalinaBase = '/opt/apache-tomcat-8-qa'
def qaHttpPort = 8081
def stagingCatalinaBase = '/opt/apache-tomcat-8-staging'
def stagingHttpPort = 8082
def perfsCatalinaBase = '/opt/apache-tomcat-8-perfs'
def perfsHttpPort = 8084
def productionCatalinaBase = '/opt/apache-tomcat-8-production'
@jwreagor
jwreagor / proxy.rs
Created January 13, 2017 15:56 — forked from ayende/proxy.rs
#![feature(lookup_host)]
extern crate futures;
extern crate tokio_core;
extern crate rand;
use rand::Rng;
use std::env;
use futures::{Future, Stream};
use tokio_core::io::{copy, Io};
@jwreagor
jwreagor / colorize-maven.sh
Created November 4, 2016 02:39 — forked from mike-ensor/colorize-maven.sh
Colorize Maven output
#!/bin/sh
# Written by Mike Ensor ([email protected])
# Copywrite 2012
# Use as needed, modify, have fun!
# This is intended to be used for Maven3 + Mac OSX
#
# To use:
# in your ".bashrc" or ".bash_profile" add the following line:
# source ~/<path to script>/colorize-maven.sh
@jwreagor
jwreagor / BLATSTING.txt
Created September 10, 2016 01:34 — forked from laanwj/BLATSTING.txt
BLATSTING
Wladimir van der Laan 2016. This document is in the public domain.
BLATSTING reverse-engineering notes. Based on files from Firewall/BLATSTING/BLATSTING_201381/LP/lpconfig.
In https://musalbas.com/2016/08/16/equation-group-firewall-operations-catalogue.html,
BLATSTING is described as "A firewall software implant that is used with EGREGIOUSBLUNDER
(Fortigate) and ELIGIBLEBACHELOR (TOPSEC)".
If true, it's interesting how this implant can target both vendors. Presumably they both use the same Linux
kernel version (2.4.x = FortiOS 5.2). Possibly, one series of network devices is a "whitelabel" variant of the other.
@jwreagor
jwreagor / timezones.js
Created August 26, 2016 14:47 — forked from themeteorchef/timezones.js
Array of timezones as objects, sorted by offset and name.
[
  {
    "offset": "GMT-12:00",
    "name": "Etc/GMT-12"
  },
  {
    "offset": "GMT-11:00",
    "name": "Etc/GMT-11"
  },
  {
@jwreagor
jwreagor / howto.md
Created July 14, 2016 12:56 — forked from leomelzer/howto.md
Installing ImageMagick & Ghostscript on Ubuntu
  1. You have Ghostscript installed, right? Otherwise sudo apt-get install ghostscript
  2. This is important and installs the headers (iapi.h etc) which are required but don't come with the default Ghostscript package: sudo apt-get install libgs-dev
  3. I also needed sudo apt-get install gs-esp
  4. For me the pre compiled version of ImageMagick never accepted Ghostscript, so let's remove it: sudo apt-get --purge remove imagemagick
  5. Get the source of ImageMagick, untar it, cd ImageMagick-xx
  6. ./configure --with-gslib=yes [and what else you need]
  7. Confirm in the output near the bottom gslib yes yes and not gslib yes no
  8. make
  9. make install
  10. Run convert -list configure | grep DELEGATES => DELEGATES bzlib djvu freetype gs jpeg jng jp2 lcms png tiff x11 xml zlib
@jwreagor
jwreagor / Dockerfile
Created June 23, 2016 01:41 — forked from aaronjudd/Dockerfile
Meteor Dockerfile with imagemagick and phantomjs
############################################################
# Builds a Meteor 0.9.x+ application Docker image
#
# See: http://docs.docker.io/
#
# Important: Best to run from a clean directory that hasn't had meteor run in it.
# Important: packages/<pkg>/.npm and .build* should not exist
#
# Example usage:
# cd appdir #in app dir
@jwreagor
jwreagor / freebsd-qemu-xhyve-mac-os-x-virtual-machine.md
Created May 14, 2016 01:20 — forked from zg/freebsd-qemu-xhyve-mac-os-x-virtual-machine.md
Create FreeBSD virtual machine using qemu. Run the VM using xhyve.

TL;DR

  • Create 10GB FreeBSD image using QEMU.
  • Run the VM using xhyve.
  • Mount host directory.
  • Resize the image.

Requisites

@jwreagor
jwreagor / gencert.sh
Created May 12, 2016 22:00 — forked from bradland/gencert.sh
Generate a self-signed SSL cert
#!/bin/bash
# Bash shell script for generating self-signed certs. Run this in a folder, as it
# generates a few files. Large portions of this script were taken from the
# following artcile:
#
# http://usrportage.de/archives/919-Batch-generating-SSL-certificates.html
#
# Additional alterations by: Brad Landers
# Date: 2012-01-27