Skip to content

Instantly share code, notes, and snippets.

@saedx1
saedx1 / stop_rds.sh
Created September 2, 2021 15:55
Stops all Running RDS Instances & Clusters in an AWS Region
export AWS_PAGER=""
export AWS_REGION="us-west-2"
output=$(aws rds describe-db-instances)
rds_instances=$(echo $output | jq -r '.DBInstances[] | select((.DBInstanceStatus == "available") and (.DBClusterIdentifier == null) ) | .DBInstanceIdentifier')
rds_clusters=$(echo $output | jq -r '.DBInstances[] | select((.DBInstanceStatus == "available") and (.DBClusterIdentifier != null) ) | .DBClusterIdentifier')
for x in $rds_instances; do
printf "Stopping RDS instance $x\n"
aws rds stop-db-instance --db-instance-identifier $x
@earthpatipon
earthpatipon / NGINX_Plus.json
Created April 9, 2021 09:23
Grafana Dashboard for NGINX Plus
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@bmcbm
bmcbm / setup-nvdia-suspend.sh
Last active October 24, 2025 10:51
NVIDIA Suspend fix
# Use systemd for managing NVIDIA driver suspend in drivers ====>>> PRIOR to version 470 <<<=====
# https://download.nvidia.com/XFree86/Linux-x86_64/450.66/README/powermanagement.html
# https://forums.developer.nvidia.com/t/unable-to-set-nvidia-kernel-module-parameters/161306
# Please note: In Fedora Linux you may need to just install the xorg-x11-drv-nvidia-power pakage
# as sugested by @goombah88 in the comments below.
TMP_PATH=/var/tmp
TMPL_PATH=/usr/share/doc/nvidia-driver-460/
echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=${TMP_PATH}" | sudo tee /etc/modprobe.d/nvidia-power-management.conf
@yaseralnajjar
yaseralnajjar / GitHub Markdown Example RTL - Right to Left.md
Last active September 29, 2021 10:53
GitHub Markdown Example RTL - Right to Left

GitHub Markdown Example RTL - Right to Left

This is an RTL (Right to Left) exmaple for GitHub:

أهلا وسهلاً 👋

How to do it?

@miguelmota
miguelmota / 30-touchpad.conf
Created February 29, 2020 02:44
Arch linux enable tap to click on touchpad
Section "InputClass"
Identifier "touchpad"
Driver "libinput"
MatchIsTouchpad "on"
Option "Tapping" "on"
Option "TappingButtonMap" "lmr"
EndSection
@avishayp
avishayp / Dockerfile
Created September 25, 2018 19:02
Add non-root user for alpine linux
# non root user example for alpine
#
# usage:
# $ docker build --build-arg "USER=someuser" --tag test .
# $ docker run --rm test
FROM alpine
ARG USER=default
ENV HOME /home/$USER
@DMeechan
DMeechan / word-list.js
Last active October 27, 2025 04:28
BIP39 mnemonic phases word list (2048 words)
const WORDLIST = ["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse",
"access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act",
"action","actor","actress","actual","adapt","add","addict","address","adjust","admit",
"adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent",
"agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert",
"alien","all","alley","allow","almost","alone","alpha","already","also","alter",
"always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger",
"angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique",
"anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic",
"area","arena","argue","arm","armed","armor","army","around","arrange","arrest",
@serkanh
serkanh / gist:3d61feded47b975da5f061c90591d0b9
Created February 27, 2018 17:08
sort ecr images by push date and get the latest
aws --profile=jumpstart ecr describe-images --repository-name lead-front-door \
--query 'sort_by(imageDetails,& imagePushedAt)[-1].imageTags[0]' --output text
@skbr1234
skbr1234 / default nginx configuration file
Last active August 7, 2025 09:20
The default nginx configuration file inside /etc/nginx/sites-available/default
# Author: Zameer Ansari
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@ygotthilf
ygotthilf / jwtRS256.sh
Last active October 19, 2025 16:19
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub