Skip to content

Instantly share code, notes, and snippets.

View fishi0x01's full-sized avatar
💾
0x01

Karl Fischer fishi0x01

💾
0x01
View GitHub Profile
@fishi0x01
fishi0x01 / luks-encryption.md
Last active January 5, 2022 18:28
Creating an encrypted drive with cryptsetup

Ensure to select the proper drive

fdisk -l
lsblk

Setup encryption

Assuming sdX is the device to encrypt

https://github.com/fishi0x01/k8s-manifests 98606b177fdbe4305035abd3d38dcf844d8cca0e
@fishi0x01
fishi0x01 / baseURL.groovy
Last active June 15, 2023 19:55
This is a collection of groovy scripts I gathered and use for bootstrapping Jenkins. Most of this can also be achieved with the CasC Plugin https://github.com/jenkinsci/configuration-as-code-plugin
#!groovy
/*
* This script configures the Jenkins base URL.
*/
import jenkins.model.JenkinsLocationConfiguration
JenkinsLocationConfiguration location = Jenkins.instance.getExtensionList('jenkins.model.JenkinsLocationConfiguration')[0]
location.url = 'https://jenkins-as-code-poc.devtail.io/'
@fishi0x01
fishi0x01 / bw_msrmnt.c
Last active November 17, 2023 07:44
Measuring Bandwidth and Round-Trip Time of a TCP Connection inside the Application Layer. Code for blog post https://fishi.devtail.io/weblog/2015/04/12/measuring-bandwidth-and-round-trip-time-tcp-connection-inside-application-layer/
/* Code snippet for measuring bandwidth with harmonic mean */
#define SKIPS 10 // initial measurement skips - skip the first slow-start values
// bandwidth metrics
double bandwidth = -1; // in MB/s
float total_bytes = 0;
int n = 0; // number of measure values
int skips = SKIPS;
@fishi0x01
fishi0x01 / homebrew.md
Last active May 12, 2024 09:03
bump vsh version