/etc/systemd/system/ssh_watchdog.service
/usr/local/bin/ssh_watchdog.sh
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
x-postgres-environment: &postgres-environment | |
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} | |
POSTGRES_USER: ${POSTGRES_USER:-postgres} | |
# POSTGRES_DB: ${POSTGRES_DB:-postgres} | |
POSTGRESQL_REPLICATION_USER: ${POSTGRESQL_REPLICATION_USER:-replicator} | |
POSTGRESQL_REPLICATION_PASSWORD: ${POSTGRESQL_REPLICATION_PASSWORD:-replicator} | |
POSTGRESQL_LOG_HOSTNAME: ${POSTGRESQL_LOG_HOSTNAME:-true} | |
x-postgres-healthcheck: &postgres-healthcheck | |
test: [ "CMD", "pg_isready", "-U", "postgres" ] | |
interval: 5s |
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 | |
cd /tmp | |
wget https://amazoncloudwatch-agent.s3.amazonaws.com/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb | |
sudo dpkg -i -E ./amazon-cloudwatch-agent.deb | |
echo '{ | |
"agent": { | |
"metrics_collection_interval": 60, | |
"run_as_user": "cwagent" | |
}, |
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 | |
# Function to create swap files | |
create_swap_files() { | |
local count=$1 | |
local swap_directory=${2:-/var/} | |
local swap_file_prefix="swapfile" | |
for ((i=1; i<=count; i++)); do | |
swap_file="${swap_directory}/${swap_file_prefix}${i}" |
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
git diff --word-diff | |
git config --global rerere.enabled true | |
git config --global rerere.autoUpdate true | |
git config --global branch.sort -committerdate | |
git config --global column.ui auto | |
git push --force-with-lease |
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: cert-manager.io/v1 | |
kind: Issuer | |
metadata: | |
name: self-signed | |
spec: | |
selfSigned: {} | |
--- | |
apiVersion: cert-manager.io/v1 | |
kind: Certificate | |
metadata: |
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
use std::{any::Any, collections::HashMap, net::SocketAddr, ops::Range, sync::Arc, time::Duration}; | |
use anyhow::{anyhow, bail, Error, Result}; | |
use axum::{ | |
// debug_handler, | |
extract::{FromRef, Path, State}, | |
http::{header::HeaderMap, StatusCode}, | |
routing::{get, post}, | |
Json, | |
Router, |
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" | |
tasks: | |
default: task --list-all | |
# provision | |
prod:up: INFRA=prod bin/up.sh | |
dev:up: bin/up.sh | |
# access | |
argo:password: echo "Bearer $(kubectl get secret -n argo default.service-account-token -o=jsonpath='{.data.token}' | base64 --decode)" | |
argo:port-forward: kubectl port-forward -n argo svc/argo-server 2746 |
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
ipam: | |
operator: | |
clusterPoolIPv4PodCIDRList: "10.42.0.0/16" | |
kubeProxyReplacement: "strict" | |
ingressController: | |
enabled: true | |
loadbalancerMode: "dedicated" | |
default: true |
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
local docker_auth=`echo -n ${DOCKER_USERNAME:?}:${DOCKER_TOKEN:?} | base64 -w 0` | |
local docker_config=`cat <<EOF | |
{ | |
"auths": { | |
"https://index.docker.io/v1/": { | |
"auth": "${docker_auth}" | |
} | |
} | |
} | |
EOF |
NewerOlder