Skip to content

Instantly share code, notes, and snippets.

View JayDoubleu's full-sized avatar
🎯
Focusing

Jay W JayDoubleu

🎯
Focusing
View GitHub Profile
@JayDoubleu
JayDoubleu / install-dnf
Created November 19, 2021 14:33 — forked from tpopela/install-dnf
Simple script that unlocks the current OSTree deployment if needed and installs the dnf for debugging purposes
#!/bin/sh
# Run this script, then install the debuginfo packages with:
# sudo dnf debuginfo-install PACKAGE
if ! ostree admin status | grep Unlocked > /dev/null 2>&1; then
if ! sudo ostree admin unlock; then
echo "Can't open the current OSTree deployment!"
exit 1
fi
fi
@JayDoubleu
JayDoubleu / toolbox.yaml
Created December 14, 2021 01:18
Update toolbox to latest and install software
- hosts: localhost
connection: local
tasks:
- name: Gather facts on a specific container
containers.podman.podman_container_info:
name:
- fedora-toolbox-35
register: toolbox_facts
- name: Add toolbox as ansible host
"""
This python script will find flatpak deduplication size stats.
Of course, this checks the regular flatpak installation at /var/lib/flatpak .
If you want to use an alternative path, execute the program with said path.
Made with :heart: by powpingdone#3611, or just powpingdone on github.
Explaination for output:
'no dedupe': The size that the ostree repository would take up if files were not deduplicated.
'dedupe': The actual size of the ostree repository.
@JayDoubleu
JayDoubleu / gitlab_runner_podman.md
Created February 19, 2022 19:03
gitlab ci runner with podman

Rootfull runner (same as docker itself)

sudo systemctl enable podman.socket
sudo systemctl start podman.socket
sudo podman run -d --name gitlab-runner --restart always --security-opt label=disable \
    -v /run/podman/podman.sock:/var/run/docker.sock \
    -v gitlab-runner-config:/etc/gitlab-runner \
    docker.io/gitlab/gitlab-runner:latest
@JayDoubleu
JayDoubleu / customToolbox.sh
Created February 19, 2022 19:33
Get podman command used to create toolbox container which can be used for tweaks etc
podman inspect fedora-toolbox-35 | jq -r '.[0].Config.CreateCommand | join(" ")'
<#
.SYNOPSIS
Returns all permutations of paths through the front door object to the target backends configured.
.DESCRIPTION
For the provided Azure Front Door resource, this function generates output objects for each permutation of:
* Url input
* Pattern Matched
@JayDoubleu
JayDoubleu / apt_wait.sh
Created March 31, 2022 10:34 — forked from tedivm/apt_wait.sh
A BASH function to wait for `apt` to finish and release all locks.
#!/usr/bin/env bash
apt_wait () {
while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do
sleep 1
done
while sudo fuser /var/lib/apt/lists/lock >/dev/null 2>&1 ; do
sleep 1
done
if [ -f /var/log/unattended-upgrades/unattended-upgrades.log ]; then
@JayDoubleu
JayDoubleu / Export-CACertificates.md
Last active November 21, 2023 10:28
Code to extract all Windows store certificates as PEM to be used by WSL behind corporate SSL proxy
function Export-CACertificates {
    param(
        [string]$OutputFile = 'all_ca_certificates.pem',
        [ValidateSet("DOS", "UNIX")]
        [string]$NewLineFormat = "DOS"
    )

    $newline = if ($NewLineFormat -eq "DOS") { "`r`n" } else { "`n" }
@JayDoubleu
JayDoubleu / azureDevOpsOrg.bicep
Created May 17, 2023 17:18
Bicep file to Link, Create or Update Azure DevOps Organisation
@description('The name of the Azure Resource to be created.')
param resourceName string
@description('The name of the Azure DevOps organization.')
param accountName string
@description('The operation type to be performed on the Azure DevOps organization.')
@allowed([
'Create '
'Link '
@JayDoubleu
JayDoubleu / deployNetworkWatchers.bicep
Created May 17, 2023 17:44
Bicep code to deploy network watchers
param tags object = {}
param environment
param prefix string
param regions array = [
'uksouth'
'ukwest'
'northeurope'
'westeurope'
'eastus'
'southcentralus'