Skip to content

Instantly share code, notes, and snippets.

View JayDoubleu's full-sized avatar
🎯
Focusing

Jay W JayDoubleu

🎯
Focusing
View GitHub Profile
- hosts: localhost
connection: local
vars:
exabgp_conf:
- section: neighbor
name: 127.0.0.15
config: |-
local-as 64512;
local-address 127.0.0.1;
description "Example neighbor";
def set_headers(credentials):
headers = credentials.signed_session().headers
headers['Content-type'] = 'application/json'
return(headers)
@JayDoubleu
JayDoubleu / main.tf
Created September 14, 2020 14:45
terraform functionapp loop
provider "azurerm" {
// subscription_id = ""
// tenant_id = ""
features {}
}
locals {
// some default/global settings here
default_location = "northeurope"
default_tags = {}
@JayDoubleu
JayDoubleu / DateTimeDecoder.py
Created September 14, 2020 23:14 — forked from abhinav-upadhyay/DateTimeDecoder.py
A JSON decoder/encoder implementation for parsing dates as datetime objects in Python
#!/usr/bin/env python
# An example of decoding/encoding datetime values in JSON data in Python.
# Code adapted from: http://broadcast.oreilly.com/2009/05/pymotw-json.html
from datetime import datetime
import json
from json import JSONDecoder
from json import JSONEncoder
@JayDoubleu
JayDoubleu / gnome-boxes.yaml
Created January 4, 2021 15:17
gnome-boxes-oci-flatpak
---
document: modulemd
version: 2
data:
summary: boxes
description: >-
boxes
license:
module:
- MIT
@JayDoubleu
JayDoubleu / get_flatpak_rpm_deps.py
Last active January 7, 2021 00:25
Ugly script to resolve dependencies for given rpm
import re
import sys
import yaml
import requests
from subprocess import check_output
flatpak_runtime_yaml = yaml.safe_load(
requests.get(
'https://src.fedoraproject.org/modules/flatpak-runtime/raw/f33/f/flatpak-runtime.yaml'
).content)
@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_update.yaml
Created January 11, 2021 19:25
Ansible update toolbox
- hosts: localhost
connection: local
tasks:
- name: Gather facts on a specific container
containers.podman.podman_container_info:
name:
- fedora-toolbox-33
- fedora-toolbox-34
register: toolbox_facts
@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.