This workflow uses the GitHub CLI to keep a forked repo in sync with the upstream repo. Add it to your repo as .github/workflows/sync-fork.yaml
.
It runs daily to sync the default branch and can be triggered manually for any branch.
#!/bin/bash | |
for ns in $(kubectl get ns -o jsonpath="{.items[*].metadata.name}"); do | |
for cj in $(kubectl get cronjobs -n "$ns" -o name); do | |
kubectl patch "$cj" -n "$ns" -p '{"spec" : {"suspend" : true }}'; | |
done | |
done |
BroadcastChannel is a new communication API proposed in the HTML Standard but not yet widely implemented. It allows messages to be sent to all other BroadcastChannel
instances sharing the same channel name within the same browsing context and origin.
var bc = new BroadcastChannel('name');
bc.postMessage(payload);
#!/usr/bin/python | |
# A quick hack of my button monitor script to monitor headlights and reverse lights to | |
# Dim the screen and switch to the reverse camera. | |
# I have not tested this... | |
# Remember, the switch or opto is switching to ground, so the logic is inverted... 0 = on 1 = off | |
# Also, you would run only one of these "Monitor" scripts. you can't be running RearviewMonitor.py AND LightMonitor.py | |
import RPi.GPIO as GPIO | |
import time | |
import subprocess, os |
#!/bin/bash | |
level=$1 | |
#echo "level given is $level" | |
if [ $# != 1 ]; then | |
echo "USAGE: $0 brightness_level (0 to 255)" | |
exit 1 | |
fi |
<ion-input type="tel" pattern="\d*" placeholder="(xxx) xxx-xxxx" mask="(***) ***-****" [(ngModel)]="phone" name="phone"></ion-input> | |
<ion-input type="tel" pattern="\d*" placeholder="xxx-xx-xxxx" mask="***-**-****" [(ngModel)]="ssn" name="ssn"></ion-input> |
/** | |
* Encrypts plaintext using AES-GCM with supplied password, for decryption with aesGcmDecrypt(). | |
* (c) Chris Veness MIT Licence | |
* | |
* @param {String} plaintext - Plaintext to be encrypted. | |
* @param {String} password - Password to use to encrypt plaintext. | |
* @returns {String} Encrypted ciphertext. | |
* | |
* @example | |
* const ciphertext = await aesGcmEncrypt('my secret text', 'pw'); |
# file: /etc/httpd/conf.d/deflate.conf | |
<ifmodule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript | |
DeflateCompressionLevel 8 | |
</ifmodule> | |
# or set in Additional nginx directives per site: | |
gzip on; | |
gzip_comp_level 2; | |
gzip_http_version 1.0; |
## Add correct content-type for fonts | |
AddType application/vnd.ms-fontobject .eot | |
AddType application/x-font-ttf .ttf | |
AddType application/x-font-opentype .otf | |
AddType application/x-font-woff .woff | |
AddType image/svg+xml .svg | |
## Fix other types | |
AddType text/javascript .js | |
AddType text/css .css |