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 / ignition.json
Created December 5, 2020 20:54
LongHorn on K3s on FlatCar on DigitalOcean
{
"ignition": {
"version": "2.1.0"
},
"storage": {
"files": [
{
"filesystem": "root",
"path": "/etc/modules-load.d/iscsi_tcp.conf",
"mode": 420,
#!/bin/sh
OUTPUT_DIR="/"
MAX_PID=65535
CGROUP_NAME="xyx"
CGROUP_MOUNT="/tmp/cgrp"
PAYLOAD_NAME="${CGROUP_NAME}_payload.sh"
PAYLOAD_PATH="${OUTPUT_DIR}/${PAYLOAD_NAME}"
OUTPUT_NAME="${CGROUP_NAME}_payload.out"
OUTPUT_PATH="${OUTPUT_DIR}/${OUTPUT_NAME}"
@frezbo
frezbo / syncrepos.sh
Created June 16, 2020 18:48 — forked from brianredbeard/syncrepos.sh
Reposync - A better tool than mrepo. Use this to sync down all channels a RHEL system is subscribed to and turn them into locally exposed yum repositories.
#!/bin/bash
# This tool can be used to sync down Red Hat based packages from RHN using only Red Hat shipped tools
# Brian "Red Beard" Harrington <[email protected]>
# To satisfy the pre-reqs for this script install the following two rpms:
# yum-utils
# createrepo
download_dir="/var/www/html/RHN"
/usr/bin/reposync --gpgcheck -m --download-metadata -l -p ${download_dir}/ >> /var/log/reposync.log 2>&1
#!/usr/bin/env ruby
require 'base64'
require 'digest'
require 'openssl'
# Author: @thesubtlety
# Decrypts Jenkins 2 encrypted strings, code change introduced around Jenkins ver 2.44
# Based off work by juyeong, https://gist.github.com/juyeong/081379bd1ddb3754ed51ab8b8e535f7c
@frezbo
frezbo / RBAC_Grants.groovy
Created June 14, 2019 06:14 — forked from chromko/RBAC_Grants.groovy
Add Jenkins RBAC roles and assign them
import hudson.model.*
import hudson.security.*
import jenkins.*
import jenkins.model.*
import java.util.*
import com.michelin.cio.hudson.plugins.rolestrategy.*
import java.lang.reflect.*
RoleBasedAuthorizationStrategy roleBasedAuthenticationStrategy = Hudson.instance.getAuthorizationStrategy()
@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
@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 / 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 / papers.md
Created July 30, 2018 04:59 — forked from jhertz/papers.md
Security Papers I Like

In absolutely no order

@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