Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
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
kubectl get roles,clusterroles -o json | jq -c ' | |
.items[] | |
| select(.rules != null) # Exclude entries with null rules | |
| select(.rules[].resources[] == "secrets") # Only resources with "secrets" access | |
| {name: .metadata.name, kind: .kind, namespace: .metadata.namespace, verbs: (.rules[].verbs | unique)}' \ | |
| jq -s 'unique_by(.name, .kind, .namespace)' # Deduplicate based on name, kind, and namespace |
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 -e | |
# Ensure required tools are installed | |
if ! command -v glab &> /dev/null; then | |
echo "Error: glab CLI is not installed. Please install it before running this script." | |
exit 1 | |
fi | |
if ! command -v jq &> /dev/null; then |
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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
creationTimestamp: null | |
labels: | |
run: cpu-hungry | |
name: cpu-hungry | |
spec: | |
containers: | |
- image: ubuntu |
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 -Eeu | |
set -x | |
# You need to use a session ticket (https://about.sourcegraph.com/handbook/support/p4-enablement#generate-a-session-ticket) | |
# in order to avoid password prompts | |
# TO edit this file, you must run `p4 edit create-revision.sh` first |
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
Show hidden characters
{ | |
// Place your snippets for shellscript here. Each snippet is defined under a snippet name and has a prefix, body and | |
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are: | |
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the | |
// same ids are connected. | |
// Example: | |
// "Print to console": { | |
// "prefix": "log", | |
// "body": [ | |
// "console.log('$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
-- CREATE read-only user when the user was created via the Google Cloud API (ie terraform) | |
-- GOOGLE CLOUD by default give fairly broad permissions | |
-- Prior reading https://stackoverflow.com/questions/13497352/error-permission-denied-for-relation-tablename-on-postgres-while-trying-a-selec | |
-- https://www.digitalocean.com/docs/databases/postgresql/how-to/modify-user-privileges/ | |
REVOKE ALL ON DATABASE db FROM "dev-readonly"; | |
-- This next line is important | |
REVOKE cloudsqlsuperuser FROM "dev-readonly"; | |
GRANT USAGE ON SCHEMA public TO "dev-readonly"; | |
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO "dev-readonly"; |
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
[alias] | |
co = checkout | |
cob = checkout -b | |
coo = !git fetch && git checkout | |
br = branch | |
brd = branch -d | |
brD = branch -D | |
merged = branch --merged | |
st = status | |
aa = add -A . |
Due to some issues with shipping at the moment my Macbook is delayed in getting to me and I will using Windows as my dev machine. These are the steps I took to set it up
Enable WSL 2 (basically required for good performance in most dev work)
Decide between Scoop & Chocolately
Install Ubuntu 20.04
Enable VS Code remote work
NewerOlder