# Check for Nvidia Hardware
lspci | grep -i nvidia
# Update
apt update
apt upgrade
# Install Nvidia drivers
apt install nvidia-driver-535 nvtop
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
# https://help.drata.com/en/articles/4994112-gcp-connection-details | |
# Create a new project for Drata Integration | |
resource "google_project" "drata" { | |
name = var.project_name | |
project_id = var.project_id | |
org_id = var.org_id | |
billing_account = var.billing_account_id | |
auto_create_network = false | |
} |
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 { BatchInterceptor } from '@mswjs/interceptors' | |
import { ClientRequestInterceptor } from '@mswjs/interceptors/ClientRequest' | |
import { FetchInterceptor } from '@mswjs/interceptors/fetch' | |
import http from 'http' | |
const interceptor = new BatchInterceptor({ | |
name: 'my-interceptor', | |
interceptors: [new ClientRequestInterceptor(), new FetchInterceptor()], | |
}) |
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://cloud.namespace.so/docs/federation/gcp | |
locals { | |
roles = [ | |
"roles/resourcemanager.projectIamAdmin", # allow managing identity | |
"roles/editor", # allow to manage all resources | |
"roles/iam.serviceAccountAdmin", # allow to manage service accounts | |
] | |
} |
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
addEventListener('fetch', (event) => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
/** | |
* Intercept requests and redirect to Firestore API | |
* @param {Request} request | |
*/ | |
async function handleRequest(request) { | |
const url = new URL(request.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
#!/bin/bash | |
# Enable bash strict mode | |
set -euo pipefail | |
IFS=$'\n\t' | |
# Disable the pager for aws commands (no less on the host) | |
export AWS_PAGER="" | |
# Get the log group arn as a parameter and cut the group name out of it |
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 -euo pipefail | |
# Buildkite pre-bootstrap hook that fails a build if there are any | |
# dangerous environment variables set. | |
blocklist=( | |
# General Linux | |
"PATH" # Executable search path | |
"LD_PRELOAD" # Preloaded shared libraries |
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
version: "3.5" | |
services: | |
minecraft: | |
image: 05jchambers/legendary-minecraft-geyser-floodgate:latest | |
restart: "unless-stopped" | |
stdin_open: true | |
tty: true | |
volumes: | |
- ./minecraft:/minecraft | |
environment: |
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 -euo pipefail | |
wait_for_container() { | |
echo -n "Waiting for $1" | |
for _ in $(seq 1 120); do | |
test "$(docker inspect --format "{{.State.Health.Status}}" "$1")" == "healthy" && break | |
sleep 1 | |
echo -n . | |
done |
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
// Spinners and Progress bars are the same thing. | |
// They are assembled with a go template with some built in functions or templated strings | |
// for things like messages before and after. | |
// Render a spinner that looks like: | |
// ⡀ Loading blah... [3s] | |
spinner := indicate.New(context.Background(), | |
`{{ spinner "⠁⠂⠄⡀⢀⠠⠐⠈ " }} {{ template "message" }} [{{ elapsed }}]`). | |
WithDefaults(indicate.SpinnerDefaults). |
NewerOlder