This Python script generates a signed URL for downloading a blob from Google Cloud Storage (GCS). The signed URL allows users to access the blob without requiring authentication.
- Python >= 3.10.x
- Google Service Account
## TCP Connection | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx-service | |
namespace: monitoring | |
spec: | |
type: ClusterIP | |
selector: | |
app: nginx |
#!/bin/python3 | |
import random; import string; ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(6)) |
## Context: https://github.com/rancher-sandbox/rancher-desktop/issues/1156 | |
sudo addgroup --system docker | |
sudo adduser $USER docker | |
newgrp docker | |
# And something needs to be done so $USER always runs in group `docker` on the `Ubuntu` WSL | |
sudo chown root:docker /var/run/docker.sock | |
sudo chmod g+w /var/run/docker.sock |
#!/bin/bash | |
wget -q -O - https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/index.json | jq -r '.offers[].currentVersionUrl' | sed 's/\.json$/.csv/' | wget -x --base="https://pricing.us-east-1.amazonaws.com" --no-host-directories --cut-dirs=3 -i |
$ git commit -m "Something terribly misguided" # (0: Your Accident) | |
$ git reset HEAD~ # (1) | |
[ edit files as necessary ] # (2) | |
$ git add . # (3) | |
$ git commit -c ORIG_HEAD # (4) | |
# Reference: https://stackoverflow.com/questions/927358/how-do-i-undo-the-most-recent-local-commits-in-git |
``` | |
Make sure your macOS version meets the prerequisites | |
https://learn.microsoft.com/en-us/dotnet/core/macos-prerequisites?tabs=netcore2x | |
If it does, then after installing via the installer, in a new terminal run this command | |
ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/ | |
Then try dotnet --version |
function procbindmounts { | |
cat /proc/*/mounts | awk '$2 ~ /^\/proc\/[0-9]*($|\/)/ { print $2 }' | sort -ur | | |
while read dir; do | |
echo ===== POSSIBLE PROCESS HIDING $dir | |
echo -ne Overlay:\\t | |
cut -d' ' -f1-7 $dir/stat | |
umount $dir | |
echo -ne Hidden:\\t\\t | |
cut -d' ' -f1-7 $dir/stat | |
done |
eval "$(ssh-agent -s)" | |
ssh-add ~/.ssh/id_ed25519 |
CREATE USER dev WITH PASSWORD 'hiiiiiiiiii'; | |
ALTER DEFAULT PRIVILEGES | |
IN SCHEMA public | |
GRANT ALL PRIVILEGES ON TABLES TO dev; | |
GRANT CONNECT ON DATABASE database_name TO dev; | |
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO dev; | |
GRANT ALL PRIVILEGES ON DATABASE database_name TO dev; | |
GRANT ALL ON SCHEMA public TO dev; |