To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
# 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 |
<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); |
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. |
pbpaste | iconv -f utf8-mac -t utf-8//TRANSLIT | pbcopy |
#!/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"); | |
} |
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 |
dataLayer = []; | |
dataLayer.push({'shoptet' : { | |
"pageType": "productDetail", | |
"product": { | |
"id": 47844, | |
"guid": "00d1a8e3-51be-11e7-819d-002590dc5efc", | |
"hasVariants": true, | |
"codes": [ | |
{ | |
"code": "47844\/38", |
dataLayer = []; | |
dataLayer.push({'shoptet' : { | |
"pageType": "productDetail", | |
"product": { | |
"id": 47844, | |
"guid": "00d1a8e3-51be-11e7-819d-002590dc5efc", | |
"hasVariants": true, | |
"codes": { | |
"47844\/38": { | |
"amount": -5, |
<script type="text/javascript"> | |
var demoPartner = { 'host': '#HOST#', 'projectId': #PROJECT_ID#, 'template': '#TEMPLATE#' }; | |
</script> | |
<script src="https://cdn.myshoptet.com/usr/demo-partner.myshoptet.com/user/documents/addon_1/common.js" type="text/javascript"></script> | |
<link href="https://cdn.myshoptet.com/usr/demo-partner.myshoptet.com/user/documents/addon_1/#TEMPLATE#.css" rel="stylesheet" /> | |
<link href="https://cdn.myshoptet.com/usr/demo-partner.myshoptet.com/user/documents/addon_1/#HOST#/style.css?v=1" rel="stylesheet" /> |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.