Skip to content

Instantly share code, notes, and snippets.

@je2ryw
je2ryw / postgres-owner-grants.sql
Created July 4, 2021 03:05 — forked from checco/postgres-owner-grants.sql
How to change OWNER for DATABASE, SCHEMA or TABLE on AWS RDS PostgreSQL. An how to REASSIGN owner for all objects on AWS RDS PostgreSQL
--
-- Change database owner
--
ALTER DATABASE "db_name" OWNER TO user;
--
-- List schemas
--
@je2ryw
je2ryw / QEMU_ON_M1.md
Created November 29, 2020 23:02 — forked from citruz/QEMU_ON_M1.md
Create Ubuntu VM with QEMU on Apple Silicon

Running Ubuntu on M1 with QEMU

Building QEMU

brew install libffi gettext pkg-config autoconf automake pixman
@je2ryw
je2ryw / README.md
Created November 25, 2020 05:10 — forked from dnaprawa/README.md
Apple M1 workaround for Docker

Apple M1 workaround for Docker

Prerequisites

You need a dedicated Linux machine (linux-vm) (in the cloud or on your VPS, or bare-metal) with Docker installed and SSH enabled (required login using SSH keys).

Workaround for people who have SSH access to a docker installed linux machine

Install go (pre-compiled binaries at https://golang.org/dl/

(Edit: there are no Darwin arm64 yet, You need to compile or use Homebrew...)

@je2ryw
je2ryw / .gitignore
Created July 1, 2020 23:14 — forked from johnandersen777/.gitignore
Setting Up k3s for Serverless (knative) on a $5 DigitalOcean Droplet Using k3d
.terraform/
*.pem
*.tf
*.tfstate
*.yaml
*.backup
istio-*/
cert-manager-*/
*.swp
env
@je2ryw
je2ryw / nginx-minio-static.md
Created May 27, 2020 05:03 — forked from harshavardhana/nginx-minio-static.md
How to configure static website using Nginx with MinIO ?

How to configure static website using Nginx with MinIO ?

1. Install nginx

2. Install minio

3. Install mc client

4. Create a bucket:

$ mc mb myminio/static
Bucket created successfully ‘myminio/static’.
@je2ryw
je2ryw / helpful-docker-commands.sh
Created February 23, 2020 22:52 — forked from garystafford/helpful-docker-commands.sh
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# exec into container
cat ../host1/.zsh_history ../host2/.zsh_history | awk -v date="WILL_NOT_APPEAR$(date +"%s")" '{if (sub(/\\$/,date)) printf "%s", $0; else print $0}' | LC_ALL=C sort -u | awk -v date="WILL_NOT_APPEAR$(date +"%s")" '{gsub('date',"\\\n"); print $0}'
@je2ryw
je2ryw / android-generate-keystores.md
Created November 15, 2019 02:14 — forked from henriquemenezes/android-generate-keystores.md
Android: Generate Release/Debug Keystores

Android: Generate Release/Debug Keystores

Generate Keystores

Debug Keystore

$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000 -dname "C=US, O=Android, CN=Android Debug"
@je2ryw
je2ryw / assume_role.sh
Created April 27, 2019 16:31 — forked from woowa-hsw0/assume_role.sh
Start AWS CLI Session with MFA Enabled (+Yubikey)
#!/bin/bash
set -eu
umask 0022
if [[ $# -lt 1 ]]; then
echo "Usage: $0 role_name [AWS ACCOUNT NUMBER]" >&2
exit 1
fi
@je2ryw
je2ryw / Windows10AWSEC2.md
Created March 23, 2019 19:55 — forked from peterforgacs/Windows10AWSEC2.md
Running Windows 10 on AWS EC2

Running Windows 10 on AWS EC2

Downloading the image

Download the windows image you want.

AWS vmimport supported versions: Microsoft Windows 10 (Professional, Enterprise, Education) (US English) (64-bit only)

So Home wont work.