Skip to content

Instantly share code, notes, and snippets.

View debovema's full-sized avatar

Mathieu Debove debovema

  • Red Hat
  • Paris, France
View GitHub Profile
@alexs77
alexs77 / _gnome-shell_extension.yml
Created December 8, 2021 09:28
Add entry to Gnome dconf array, eg. for enabling or disabling a gnome shell extension
# Usage:
# ansible.builtin.include_tasks: _gnome-shell_extension.yml
# loop:
# - { name: "Display Name",
# flag: flag_from_host_var_file,
# src: source url to download from,
# uuid: uuid to enable or disable,
# state: "present" to enable, "absent" to disable }
- name: "gnome | extension | {{ item.name }} | Enabling | create extension directory"
@orpiske
orpiske / kind-with-local-registry.sh
Created May 12, 2021 09:18
Kind with local registry (with registry address fixes)
#!/bin/sh
set -o errexit
####
## Kind cluster with local registry (fixed script from the upstream kind). See NOTE comments below for the changed items
# create registry container unless it already exists
reg_name='kind-registry'
reg_port='5000'
running="$(docker inspect -f '{{.State.Running}}' "${reg_name}" 2>/dev/null || true)"
@debovema
debovema / .gitignore
Last active February 19, 2024 20:05
OpenWrt custom firmware for Xiaomi Mi Router 3g (with FPU emulator enabled, custom packages preinstalled, AzireVPN preconfigured)
openwrt/
@aliicex
aliicex / readme.md
Last active July 6, 2024 15:38
Faux-implementing IPv6 Policy-Based Routing on OpenWRT

Stangri's VPN Policy Routing package is a mainstay of my OpenWRT builds. It works great for IPv4, but I couldn't, for the life of me, get it working with IPv6. Instead, I had to faux-implement PBR as follows.

My VPN provider only gave me a single IP address with a /128 prefix, so I was forced to use NAT6. This left me with a stanza in my firewall config that looks like this; note the masq6 option

config zone
	option name 'wan_vpn'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
@mpreu
mpreu / fcos-embed-config-in-image
Created January 27, 2020 00:21
Fedora CoreOS - Example script to inject an Ignition configuration file into the virtual machine image. Originates from this blog post: https://www.matthiaspreu.com/posts/fedora-coreos-embed-ignition-config/.
#!/bin/env bash
set -eo pipefail
#
# Part of a Fedora CoreOS blog post on my website:
# https://www.matthiaspreu.com/posts/fedora-coreos-embed-ignition-config/
#
# Script modifies a FCOS virtual machine image and injects
# an Ignition configuration in it.
#
@fworks
fworks / install-zsh-windows-git-bash.md
Last active July 2, 2024 08:16
Zsh / Oh-my-zsh on Windows Git Bash
@pyrou
pyrou / docker-compose.yml
Last active July 8, 2024 17:17
Use https://traefik.me SSL certificates for local HTTPS without having to touch your /etc/hosts or your certificate CA.
version: '3'
services:
traefik:
restart: unless-stopped
image: traefik:v2.0.2
ports:
- "80:80"
- "443:443"
labels:
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
@drochgenius
drochgenius / frontend-contribution.ts
Last active October 21, 2021 07:13
Hide unused activity bar icons (view container icons)
import { injectable } from 'inversify';
import { FrontendApplicationContribution, FrontendApplication } from '@theia/core/lib/browser';
import { MaybePromise } from '@theia/core/lib/common/types';
import { Widget } from '@theia/core/lib/browser/widgets';
@injectable()
export class ExampleFrontendContribution implements FrontendApplicationContribution {
/**
* Called after the application shell has been attached in case there is no previous workbench layout state.
* Should return a promise if it runs asynchronously.
@bn4t
bn4t / ci-unattended.sh
Created October 11, 2018 12:57
cloud-init unattended upgrades
#!/bin/sh
echo unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | debconf-set-selections
apt-get -y install unattended-upgrades
@carloscarnero
carloscarnero / 1-rbac.yaml
Created August 14, 2018 02:53
Traefik on Rancher
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: traefik-ingress-controller
rules:
- apiGroups:
- ""
resources:
- services