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
DO $$ | |
DECLARE | |
r RECORD; | |
s RECORD; | |
BEGIN | |
-- Loop through all non-system schemas | |
FOR s IN (SELECT schema_name FROM information_schema.schemata | |
WHERE schema_name NOT IN ('pg_catalog', 'information_schema', 'public') | |
AND schema_name NOT LIKE 'pg_%') LOOP |
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
/// The base type acts as a stop token. | |
struct Base; | |
/// The wrapped type, defined in terms of the wrapped base `B` and the new value `T`. | |
/// You can stuff it with references and live without lifetime definitions on the type. | |
struct Wrapped<B, T>(B, T); | |
impl Base { | |
pub fn new(value: &str) -> Wrapped<Self, &str> { | |
Wrapped(Base, value) |
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
# Merge an orphan branch and overwrite our changes ("take theirs"). | |
git merge --allow-unrelated-histories -Xtheirs $ORPHAN_BRANCH | |
# List all files existing in branch "timeline" that do not exist in branch "$ORPHAN_BRANCH" | |
git diff-tree -r --diff-filter=D --name-only timeline $ORPHAN_BRANCH | |
# ... and delete them | |
git diff-tree -r --diff-filter=D --name-only timeline $ORPHAN_BRANCH | xargs -d '\n' git rm |
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 bash | |
# See https://gist.github.com/sunsided/af8a90b0700917b5f16cf6f4ebb49dcb | |
set -euo pipefail | |
# check if stdout is a terminal... | |
#if test -t 1; then | |
# see if it supports colors... | |
ncolors=$(tput colors) | |
if test -n "$ncolors" && test $ncolors -ge 8; then | |
bold="$(tput -T ansi bold)" |
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
# Added for AV Access KVM switch | |
# deactivate USB power management | |
# QinHeng Electronics WCH UART TO KB-MS_V1.7displ | |
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1a86", ATTR{idProduct}=="e229" | |
# QinHeng Electronics CH340 serial converter | |
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1a86", ATTR{idProduct}=="7523" | |
# C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A) | |
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0d8c", ATTR{idProduct}=="0014" |
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 bash | |
set -euo pipefail | |
CACHE=$(realpath ~/.cache/trivy) | |
if [ $# -eq 0 ]; then | |
echo "Please specify a local repository to scan." | |
exit 1 | |
else | |
REPO=$(realpath $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
cargo crev trust --level low https://github.com/sunsided/crev-proofs |
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
# Package Review of some-package 0.1.2 | |
review: | |
thoroughness: low | |
understanding: medium | |
rating: positive | |
flags: | |
unmaintained: false | |
alternatives: | |
- source: https://crates.io | |
name: '' |
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
$ cargo crev verify --show-all | |
status reviews issues owner downloads loc lpidx geiger flgs crate version latest_t | |
pass 1 3 0 0 0 2 17226K 183779K 870 178 101 ____ once_cell 1.8.0 ↑1.16.0 | |
none 0 0 0 0 2 2 2807K 61575K 3371 57 1137 ____ bumpalo 3.8.0 | |
none 0 2 0 0 0 1 8038K 125055K 5595 57 0 CB__ typenum 1.14.0 ↓1.11.2 | |
pass 1 1 0 0 1 2 7059K 126074K 323 239 32 CB__ futures-core 0.3.17 = | |
none 0 2 0 0 1 1 35346K 197798K 4814 79 2193 CB__ memchr 2.4.1 ↓2.2.1 | |
pass 3 8 0 0 1 2 167548K 192133K 134 418 8 ____ lazy_static 1.4.0 = | |
pass 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
$ cargo crev repo fetch all | |
Fetching... | |
https://github.com/dpc/crev-proofs no updates | |
https://github.com/matklad/crev-proofs no updates | |
https://github.com/nbigaouette-eai/crev-proofs no updates | |
https://github.com/kornelski/crev-proofs no updates | |
https://github.com/toidiu/crev-proofs no updates | |
https://github.com/apoelstra/crev-proofs no updates | |
... |
NewerOlder