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
FROM php:7-fpm | |
RUN apt-get update && \ | |
apt-get install -y \ | |
msmtp-mta \ | |
&& \ | |
rm -rf /var/lib/apt/lists/* /var/cache/apt/* | |
RUN printf 'host my.smtp.server\n' > /etc/msmtprc |
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 winston = require("winston"); | |
const winstonFmt = winston.format; | |
const TIMESTAMP_FMT = "YYYY-MM-DD HH:mm:ss"; | |
const NANOS_IN_MILLI = BigInt(1e6); | |
const LOG_LEVEL = process.env.LOG_LEVEL || "warn"; | |
const LOG_LEVELS = { | |
levels: { | |
error: 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
#!/usr/bin/env python3 | |
import requests | |
import time | |
from sys import argv | |
from threading import Thread | |
URL = argv[-1] | |
def worker(i, url): |
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/env python3 | |
from urllib.request import urlretrieve | |
from tempfile import NamedTemporaryFile, TemporaryDirectory | |
from zipfile import ZipFile | |
from glob import iglob | |
from os.path import join as path_join | |
from xml.etree import ElementTree | |
from json import dumps as json_stringify | |
from re import sub as regex_sub |
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/env python3 | |
# Uses PyYAML>=0.2.5 | |
from yaml import dump as yaml_dump | |
from json import load as json_load, JSONDecodeError | |
from argparse import ArgumentParser | |
from os.path import exists as path_exists | |
from sys import exit, stderr | |
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/env python3 | |
from RPLCD.i2c import CharLCD | |
from argparse import ArgumentParser | |
from http.server import ThreadingHTTPServer, BaseHTTPRequestHandler | |
from json import dumps as json_dumps | |
from sys import stderr | |
from threading import Lock | |
from board import I2C |
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/env python3 | |
from argparse import ArgumentParser | |
from http.server import ThreadingHTTPServer, BaseHTTPRequestHandler | |
from json import dumps as json_dumps | |
from threading import Thread, RLock | |
from time import sleep | |
import Adafruit_DHT |
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://www.cockroachlabs.com/docs/v21.2/start-a-local-cluster-in-docker-mac.html | |
version: "3.9" | |
services: | |
roach1: | |
image: "cockroachdb/cockroach:v21.2.2" | |
container_name: taxonTree-roach1 | |
hostname: roach1 | |
networks: [ roachnet ] | |
volumes: [ "roach1-data:/cockroach/cockroach-data" ] | |
command: |
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 | |
if [ $# -lt 1 ]; then | |
echo Provide a date to convert | |
exit 1 | |
fi | |
# Provide 'Fri 18 Feb 2022 05:30:00 PM PST' | |
DATE=$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
#!/usr/bin/env python3 | |
from RPLCD.i2c import CharLCD | |
from pytz import timezone, utc | |
from datetime import datetime | |
from time import sleep, time as get_ts | |
from concurrent.futures import ThreadPoolExecutor | |
I2C_EXPANDER = "PCF8574" |
OlderNewer