Skip to content

Instantly share code, notes, and snippets.

View everyx's full-sized avatar

Gavin Luo everyx

View GitHub Profile
@lilydjwg
lilydjwg / btrfs-autosnapshot
Last active December 5, 2024 16:29
btrfs-autosnapshot
#!/usr/bin/python3
import os
import datetime
import subprocess
import logging
import tempfile
import contextlib
from pathlib import Path
@troyfontaine
troyfontaine / beg_redirect.map
Last active March 23, 2023 10:19
HAProxy Redirecting based on an HTTP Query or a Map with a fallback redirect based on host header
# This file contains only partial paths to match on
# This file should reside in the same directory as the haproxy.cfg simply due to the way it is configured in the sample snippet-but they can go anywhere in the /etc/haproxy directory
/my-partial- https://subdomain3.mydomain.com/my-new-full-path
@areknawo
areknawo / LazyHydrate.vue
Created August 13, 2021 11:18
Vue 3 lazy hydration component
<script lang="ts">
import { defineComponent, onMounted, PropType, ref, watch } from "vue";
type VoidFunction = () => void;
const isBrowser = () => {
return typeof window === "object";
};
export default defineComponent({
props: {