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
// Dracula colors Credit: https://gist.github.com/EgZvor | |
* { | |
background: rgba ( 40, 42, 54, 100 % ); | |
current-line: rgba ( 68, 71, 90, 100 % ); | |
selection: rgba ( 68, 71, 90, 100 % ); | |
foreground: rgba ( 248, 248, 242, 100 % ); | |
comment: rgba ( 98, 114, 164, 100 % ); | |
cyan: rgba ( 139, 233, 253, 100 % ); | |
green: rgba ( 80, 250, 123, 100 % ); | |
orange: rgba ( 255, 184, 108, 100 % ); |
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
const vertical = d3.select(".chart") | |
.append("div") | |
.attr("class", "remove") | |
.style("position", "absolute") | |
.style("z-index", "19") | |
.style("width", "1px") | |
.style("height", "100%") | |
.style("top", "0px") | |
.style("left", "0px") | |
.style("background", "#000000"); |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
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
date,message,messageShort | |
21 March 2020,"The Government introduces the 4-tiered Alert Level system to help combat COVID-19. The Prime Minister announces that New Zealand is at Alert Level 2.","NZL L2" | |
23 March 2020,"At 1:30pm the Prime Minister announces New Zealand has moved to Alert Level 3, effective immediately. In 48 hours, New Zealand will move to Alert Level 4.","NZL L3" | |
25 March 2020,"At 11:59pm, New Zealand moves to Alert Level 4, and the entire nation goes into self-isolation. A State of National Emergency is declared at 12:21pm.","NZL L4" | |
29 March 2020,"New Zealand reports its first COVID-19-related death.","Covid death #1" | |
31 March 2020,"The State of National Emergency is extended at 9:27am. Further extensions are made at: 9:25am on 2 April 2020\n, 12:21pm on 8 April 2020\n, 12:21pm on 15 April 2020\n, 12:21pm on 22 April 2020\n, 12:21pm on 29 April 2020\n, 12:21pm on 5 May 2020.","State Emergency Extended" | |
20 April 2020,"The Prime Minister announces New Zealand will remain at Alert Level 4 for an |
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
Date/Time From | Date/Time To | App Registrations | QR Codes Generated | NZBN Registered Businesses | Scans | Manual Entries | Active Devices | Bluetooth Active (24hr) | |
---|---|---|---|---|---|---|---|---|---|
19/05/2020 12:00 | 20/05/2020 12:00 | 92595 | 1407 | 0 | |||||
20/05/2020 12:00 | 21/05/2020 12:00 | 143405 | 5800 | 11411 | 11411 | 0 | |||
21/05/2020 12:00 | 22/05/2020 12:00 | 57000 | 4892 | 23561 | 23561 | 0 | |||
22/05/2020 12:00 | 23/05/2020 12:00 | 31000 | 1528 | 30275 | 30275 | 0 | |||
23/05/2020 12:00 | 24/05/2020 12:00 | 30000 | 31444 | 0 | |||||
24/05/2020 12:00 | 25/05/2020 12:00 | 26000 | 29426 | 0 | |||||
25/05/2020 12:00 | 26/05/2020 12:00 | 25000 | 3330 | 31629 | 0 | ||||
26/05/2020 12:00 | 27/05/2020 12:00 | 17000 | 1510 | 36794 | 0 | ||||
27/05/2020 12:00 | 28/05/2020 12:00 | 14000 | 1200 | 39216 | 0 |
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
#!/bin/python3 | |
import functools | |
from typing import Callable | |
def wrapped(fn: Callable[..., str] = None, /, chars: str = '"') -> Callable[..., str] or str: | |
""" | |
A decorator to wrap a method response in quotes |
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
#!/bin/bash | |
# _ _ _ _ | |
# ___ ___ ___ | |_| |_ ______ _ ___| |__ / | | |
# / __|/ __/ _ \| __| __|_ / _` |/ __| '_ \| | | |
# \__ \ (_| (_) | |_| |_ / / (_| | (__| | | | | | |
# |___/\___\___/ \__|\__/___\__,_|\___|_| |_|_| | |
# | |
# Zac Scott (github.com/scottzach1) | |
# | |
# A quick and hacky script to configure n self-hosted GitHub runners. |
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 io | |
import sys | |
class RedactIO(io.IOBase): | |
""" | |
A minimal io wrapper to redact sensitive data. | |
""" | |
def __init__(self, buffer, redactions: dict[str, str], **kwargs) -> None: |
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
""" | |
A quick Flask app that dumps everything to disk. | |
!!THIS IS NOT SAFE FOR PRODUCTION CODE!! | |
""" | |
from pathlib import Path | |
from flask import Flask, request, jsonify | |
import json | |
import time |
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
#!/bin/bash | |
# Set the profile you want to use for MFA | |
SRC_PROFILE="default" | |
MFA_PROFILE="default-mfa" | |
MFA_DEVICE_ARN=$(aws configure get aws_mfa_device --profile "$SRC_PROFILE") | |
if [ -z "$MFA_DEVICE_ARN" ]; then | |
echo "Error: MFA device ARN not found in the ~/.aws/credentials file for profile $SRC_PROFILE" | |
exit 1 |
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
#!/bin/bash | |
# Set the profile you want to use for MFA | |
SRC_PROFILE="default" | |
MFA_PROFILE="default-mfa" | |
MFA_DEVICE_ARN=$(aws configure get aws_mfa_device --profile "$SRC_PROFILE") | |
OP_VAULT_ITEM="<my-item-name> | |
if [ -z "$MFA_DEVICE_ARN" ]; then | |
echo "Error: MFA device ARN not found in the ~/.aws/credentials file for profile $SRC_PROFILE" |