Skip to content

Instantly share code, notes, and snippets.

@hurryman2212
hurryman2212 / how-to-install-ubuntu-on-f2fs.md
Created September 18, 2023 02:53
Installing Ubuntu 22.04 LTS On F2FS Root Partition

Ubuntu 22.04 LTS With Boot-Time Mounted F2FS Root Partition

Put "/" at the end for src. and dest. directory for "rsync" to do proper copy!

Original partition structure

"/dev/nvme0n1p1" => /boot/efi (fat32)

"/dev/nvme0n1p2" => /boot (ext4)

"/dev/nvme0n1p3/" => / (f2fs)

@shaoran
shaoran / gist:1db4ed8bba8bc054cd31e2ea05a668d1
Last active September 27, 2023 10:54 — forked from zfwf/gist:64695924cb0941089f8163e73cfad209
NetworkManager tls-cipher=DEFAULT:@SECLEVEL=0
# Client configs, 16.04,
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
# network manager, 16.04, install below package to enable import openvpn client configs
sudo apt install network-manager-openvpn-gnome
# Client configs, 18.04/18.10
@mrcomoraes
mrcomoraes / clear_cache_MS_Teams.sh
Last active May 10, 2024 12:07
Clear cache Microsoft Teams on Linux
#!/bin/bash
# This script cleans all cache for Microsoft Teams on Linux
# Tested on Ubuntu-like, Debian by @necrifede, Arch Linux by @lucas-dclrcq and Manjaro with flatpak by @danie1k. Feel free to test/use in other distributions.
# Tested Teams via snap package.
# Tested Teams via flatpak package.
#
# How to use in terminal:
# ./clear_cache_MS_Teams.sh ( deb-stable | deb-insider | snap | flatpak )
# or
@aursu
aursu / gitlab-error-encryption.md
Last active April 9, 2025 05:53
GitLab error OpenSSL::Cipher::CipherError () in app/controllers/admin/application_settings_controller.rb:40:in `update'

The issue

It happened after secrets file was lost during GitLab upgrade.

The case described in documentation When the secrets file is lost

But not completely clear.

From log file /var/log/gitlab/gitlab-rails/production.log:

@przemeklal
przemeklal / gist:00fcfac12346049792ec74da1b03cb4d
Created February 19, 2019 09:07
Devstack all-in-one external network connectivity with masquerade
br-ex IP address is 172.24.4.1/24
iptables -I FORWARD -i br-ex -j ACCEPT
iptables -I FORWARD -o br-ex -j ACCEPT
iptables -t nat -I POSTROUTING -s 172.24.4.0/24 ! -d 172.24.4.0/24 -j MASQUERADE
@pydevops
pydevops / gke-ingress-manged-tls.md
Last active August 10, 2023 09:20
Create a GCP managed TLS certificate for the GKE ingress

GKE ingress in a nutshell

Solution #1 (ManagedCertificate CRD in GKE)

  • GKE with Google-managed SSL certificates
    • Use ManagedCertificate CRD to create a object.
    • Associate the ManagedCertificate object to an Ingress by adding an annotation networking.gke.io/managed-certificates to the Ingress. This annotation is a comma-separated list of ManagedCertificate resources, cert1,cert2,cert3 for example.

Solution #2 (Google Cloud SSL Certificate)

Assumption

@oifland
oifland / Jenkinsfile
Last active July 15, 2024 06:36
Loops in Jenkinsfiles
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
echo_all(abcs)
}
stage('Test 2: loop of sh commands') {
def flatten_json(json):
if type(json) == dict:
for k, v in list(json.items()):
if type(v) == dict:
flatten_json(v)
json.pop(k)
for k2, v2 in v.items():
json[k+"."+k2] = v2
@sahilsk
sahilsk / instance_filtering.md
Last active March 20, 2025 20:13
boto3, python, aws, instance filtering

Source

Russell Ballestrini

– Filtering AWS resources with Boto3

This post will be updated frequently when as I learn more about how to filter AWS resources using Boto3 library.

Filtering VPCs by tags

@drmalex07
drmalex07 / README-oneshot-systemd-service.md
Last active October 28, 2025 12:45
An example with an oneshot service on systemd. #systemd #systemd.service #oneshot

README

Services declared as oneshot are expected to take some action and exit immediatelly (thus, they are not really services, no running processes remain). A common pattern for these type of service is to be defined by a setup and a teardown action.

Let's create a example foo service that when started creates a file, and when stopped it deletes it.

Define setup/teardown actions

Create executable file /opt/foo/setup-foo.sh: