Skip to content

Instantly share code, notes, and snippets.

View frezbo's full-sized avatar
🏠
Working from home

Noel Georgi frezbo

🏠
Working from home
View GitHub Profile
@frezbo
frezbo / ghprb_auth.groovy
Created June 6, 2017 16:30 — forked from kpettijohn/ghprb_auth.groovy
Configure GitHub Pull Request Builder Jenkins plugin with Groovy
// ghprb 1.29.2
import java.lang.reflect.Field
import jenkins.model.*
import org.jenkinsci.plugins.ghprb.*
def descriptor = Jenkins.instance.getDescriptorByType(org.jenkinsci.plugins.ghprb.GhprbTrigger.DescriptorImpl.class)
Field auth = descriptor.class.getDeclaredField("githubAuth")
auth.setAccessible(true)
#!/bin/bash
for d in /sys/kernel/iommu_groups/*/devices/*; do
n=${d#*/iommu_groups/*}; n=${n%%/*}
printf 'IOMMU Group %s ' "$n"
lspci -nns "${d##*/}"
done
@frezbo
frezbo / gist:2228c3ea3f7b68f51209a5a8559eb6f4
Created November 22, 2017 15:57 — forked from nemonik/gist:951a0e55436e0708222b
A Python script to extract data out of DISA STIG Viewer xccdf file to a CSV
###
# A Python script to extract data out of a DISA STIG Viewer xccdf file to a CSV
# @author Michael Joseph Walsh <github.com@nemonik.com>
##
import csv
import glob
import os
import sys
import xml.etree.ElementTree as ET
On Fri, Jun 26, 2015 at 10:18:27AM -0700, Alexander Morozov wrote:
There is no network section in spec now. We probably should have some.
For what it's worth, you can currently (48182db, 2015-07-07) just
use the host's network configuration with the following changes to the
stock config:
Add to mounts:
{

In a terminal start a server.

$ python -m SimpleHTTPServer 8000

In another terminal set up the cgroups freezer.

@frezbo
frezbo / jessfraz.md
Created July 30, 2018 04:59 — forked from acolyer/jessfraz.md
Containers, operating systems and other fun things from The Morning Paper
@frezbo
frezbo / papers.md
Created July 30, 2018 04:59 — forked from jhertz/papers.md
Security Papers I Like

In absolutely no order

@frezbo
frezbo / SetBuildEnvVars.groovy
Created August 21, 2018 11:28 — forked from alces/SetBuildEnvVars.groovy
Set environment variables during a Jenkins build using Groovy
// should be run as Groovy System Script
import hudson.EnvVars
import hudson.model.Environment
def build = Thread.currentThread().executable
def vars = [ENV_VAR1: 'value1', ENV_VAR2: 'value2']
build.environments.add(0, Environment.create(new EnvVars(vars)))
@frezbo
frezbo / 1-setup.md
Created November 23, 2018 08:43 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or Krypt.co.

@frezbo
frezbo / md4.rb
Created December 12, 2018 19:06 — forked from tprynn/md4.rb
Ruby md4 implementation
def md4(string)
# functions
mask = (1 << 32) - 1
f = proc {|x, y, z| x & y | x.^(mask) & z}
g = proc {|x, y, z| x & y | x & z | y & z}
h = proc {|x, y, z| x ^ y ^ z}
r = proc {|v, s| (v << s).&(mask) | (v.&(mask) >> (32 - s))}
# initial hash
a, b, c, d = 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476