This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
WORKED with NVchad, not with LazyVim, however - neovim's undo is making this obsolete | |
Description: Numbered Central Backup | |
Created by: Martin Krischik (2006) | |
Adapted by: Ondrej Brablc (2011 for vim, 2024 for neovim) | |
Customize: | |
vim.g.ncbackup_directory name of backup directory central to edited file by default ~/.local/state/nvim/ncbackups | |
vim.g.ncbackup_purge count of backups to hold - purge older once. 0 switches the feature off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stingy Jack Refactoring | |
# Good code doesn't need comments ... | |
# ... this dress code does | |
from matrix import BusinessSmart | |
from halloween import Lantern, PumpkinLantern | |
from typing import Protocol | |
__author__ = "Ondrej" | |
__version__ = "Halloween 2024" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://github.com/brablc/swarm-health-alerter/edit/main/README.md#alerting-for-any-service | |
# Place to adm/management/commands/celery_monitor.py (change adm to your main application in the code too) | |
import os | |
import logging | |
import json | |
from celery import Celery | |
from celery.events import EventReceiver | |
from django.core.management.base import BaseCommand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function $debug(...args) { | |
console.log('debug', ...args); | |
} | |
function $on(eventName, callback) { | |
document.currentScript.parentElement.addEventListener(eventName, callback); | |
} | |
function $send(element, name, detail) { | |
let event = new CustomEvent(name, { detail: detail, bubbles: true }); | |
element?.dispatchEvent(event); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import os | |
import requests | |
from abc import ABC, abstractmethod | |
parser = argparse.ArgumentParser( | |
description=""" | |
Generates testing files for JS libraries that are popular with htmx. | |
Run --setup first to download libraries for local use. | |
A separate file for each library will be generated - timing is done with console.time and console.timeEnd. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pbpaste | iconv -f utf8-mac -t utf-8//TRANSLIT | pbcopy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
if (!array_key_exists(1, $argv)) { | |
exit("Missing first param - path to parsed XML file! \nUse as {$argv[0]} </path/to/file.xml>\n"); | |
} | |
if (!file_exists($argv[1])) { | |
exit("File {$argv[1]} not found!\n"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://d4twhgtvn0ff5.cloudfront.net/caa-rechecking-incident-affected-serials.txt.gz | |
zcat caa-rechecking-incident-affected-serials.txt.gz | awk '{print $2}' | sort > serials_only.txt | |
find /etc/letsencrypt/live -name 'cert.pem' -printf "%h\n" | cut -f5 -d/ | xargs -I% echo "echo \$(openssl x509 -text -noout </etc/letsencrypt/live/%/cert.pem | grep -A1 Serial\ Number | sed -e 1d -e's/://g' ) %" | sh > serials_hosted_with_domain.txt | |
cut -f1 -d\ serials_hosted_with_domain.txt | sort >serials_hosted.txt | |
comm -12 serials_only.txt serials_hosted.txt > affected_domains.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dataLayer = []; | |
dataLayer.push({'shoptet' : { | |
"pageType": "productDetail", | |
"product": { | |
"id": 47844, | |
"guid": "00d1a8e3-51be-11e7-819d-002590dc5efc", | |
"hasVariants": true, | |
"codes": [ | |
{ | |
"code": "47844\/38", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dataLayer = []; | |
dataLayer.push({'shoptet' : { | |
"pageType": "productDetail", | |
"product": { | |
"id": 47844, | |
"guid": "00d1a8e3-51be-11e7-819d-002590dc5efc", | |
"hasVariants": true, | |
"codes": { | |
"47844\/38": { | |
"amount": -5, |
NewerOlder