This file contains hidden or 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 bash | |
| # Note that this doesn't work on Ubuntu 22.04, but works on 20.04. This seem to be due to the newer kernel used by default on newer Ubuntu versions (YMMV) | |
| set -euo pipefail | |
| # Install system deps | |
| apt-get update && apt-get upgrade -y && sudo apt-get install \ | |
| bison \ | |
| build-essential \ | |
| flex \ |
This file contains hidden or 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
| function i() { | |
| arch -x86_64 $@ | |
| } | |
| alias ish='arch -x86_64 zsh' | |
| alias ibrew='arch -x86_64 brew' |
This file contains hidden or 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
| # In most cases, `terminationMessagePolicy: FallbackToLogsOnError` must be set! | |
| kubectl --namespace "${NAMESPACE}" -l app="${APP}" get pods -o jsonpath='{.items[?(@.status.containerStatuses[*].state.waiting)].status.containerStatuses[*].lastState.terminated.message}' |
This file contains hidden or 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
| version: "3.4" | |
| # More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/ | |
| services: | |
| pihole: | |
| container_name: pihole | |
| image: pihole/pihole:latest | |
| ports: | |
| - "10.42.0.0:53:53/tcp" | |
| - "10.42.0.0:53:53/udp" |
This file contains hidden or 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
| """HTTP-specific events.""" | |
| import mitmproxy.http | |
| class Events: | |
| filter = "news.ycombinator.com" | |
| def http_connect(self, flow: mitmproxy.http.HTTPFlow): | |
| """ | |
| An HTTP CONNECT request was received. Setting a non 2xx response on |
This file contains hidden or 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 * as React from "react"; | |
| import * as ReactDOM from "react-dom"; | |
| import { useEffect, useRef, useState } from "react"; | |
| interface MediaDeviceSelectorProps { | |
| kind: MediaDeviceKind; | |
| availableDevices: Array<MediaDeviceInfo>; | |
| selectedDeviceID?: string; | |
| onDeviceUpdated: (newDeviceID: string) => void; | |
| } |
This file contains hidden or 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
| # Source this from e.g. `.zshrc` | |
| # Ensure `ddcctl` from https://github.com/kfix/ddcctl is installed and available in your `$PATH` | |
| # | |
| # Other resources to learn how this works: | |
| # http://boichat.ch/nicolas/ddcci/specs.html | |
| # http://boichat.ch/nicolas/ddcci/method.html | |
| # https://developer.apple.com/documentation/iokit/1410388-ioi2cinterfaceopen?language=objc | |
| # https://github.com/MonitorControl/MonitorControl | |
This file contains hidden or 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
| Pacific/Pago_Pago −11:00 | |
| Pacific/Honolulu −10:00 | |
| America/Anchorage −09:00 | |
| America/Los_Angeles −08:00 | |
| America/Denver −07:00 | |
| America/Chicago −06:00 | |
| America/New_York −05:00 | |
| America/La_Paz −04:00 | |
| America/Nuuk −03:00 | |
| America/Noronha −02:00 |
This file contains hidden or 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 os | |
| hci_sockets = [] | |
| with open('/proc/net/hci') as hcif: | |
| for line in hcif: | |
| if 'Inodes' in line: | |
| continue |