Skip to content

Instantly share code, notes, and snippets.

View austonpramodh's full-sized avatar

Auston Pramodh Barboza austonpramodh

View GitHub Profile
@austonpramodh
austonpramodh / docker-compose.yml
Last active January 23, 2025 23:10
Caddy-MailcowDockerized: Copy Certs to Mailcow from Caddy
services:
caddy:
image: caddy:2-alpine
container_name: caddy
restart: unless-stopped
volumes:
- caddy-config:/config
- caddy-data:/data
- ./Caddyfile:/etc/caddy/Caddyfile:ro
ports:
@austonpramodh
austonpramodh / sleep-stop.sh
Created March 15, 2024 22:51
Stop Linux from sleeing for certain time!
#!/bin/bash
# Function to handle Ctrl+C
function ctrl_c() {
echo -e "\nCtrl+C pressed. Aborting countdown and releasing inhibition."
echo "Killing systemd-inhibit process... - PID: $inhibit_pid"
kill $inhibit_pid # Kill systemd-inhibit process
exit 1
}
#!/bin/bash
# exit when any command fails
# set -e
echo "Android bundle build script!!"
# Alias tools for better code
bundletool="java -jar bundletool-all-1.8.2.jar"
# Remove gradle caches
echo "deleting .gradle caches!"
###############################################################################
# OpenVPN 2.0 Sample Configuration File
# for PacketiX VPN / SoftEther VPN Server
#
# !!! AUTO-GENERATED BY SOFTETHER VPN SERVER MANAGEMENT TOOL !!!
#
# !!! YOU HAVE TO REVIEW IT BEFORE USE AND MODIFY IT AS NECESSARY !!!
#
# This configuration file is auto-generated. You might use this config file
# in order to connect to the PacketiX VPN / SoftEther VPN Server.
@austonpramodh
austonpramodh / oauth-proxy.yaml
Created October 1, 2021 09:08
OAuth2-proxy-bitbucket
---
apiVersion: v1
kind: ConfigMap
metadata:
name: oauth2-proxy-nginx
namespace: oauth2-proxy
data:
nginx.conf: |
worker_processes 5;
@austonpramodh
austonpramodh / Caddyfile
Created July 12, 2021 14:32
Caddyfile for portainer and pgadmin4
{
# Global options block. Entirely optional, https is on by default
# Optional email key for lets encrypt
email [email protected]
# Optional staging lets encrypt for testing. Comment out for production.
# acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
}
type ConvertNullableToUndefined<T extends Record<never, never>> = {
[K in keyof T]: T[K] extends NonNullable<T[K]> ? T[K]: (NonNullable<T[K]> | undefined)
};
#!/bin/bash
#
function get_pid {
local PID="$(cat /tmp/pi-fancontrol-bash.pid 2>/dev/null)"
echo $PID
}
function d_start ( )
{
@austonpramodh
austonpramodh / cputemp.sh
Created April 30, 2021 20:15
Raspberry pi 4 CPU Temp and Frequency
#!/bin/bash
#----------------------------------------------------------------------------------------
# Obtains the current value of the CPU temperature.
#----------------------------------------------------------------------------------------
function get_cpu_temp()
{
# Initialize the result.
local result=0.00
# The first line in this file holds the CPU temperature as an integer times 1000.
# Read the first line from the file.
@austonpramodh
austonpramodh / docker-compose.yml
Created March 21, 2021 19:55
Docker-compose file for MYSQL with AutoBackup to S3
# Use root/example as user/password credentials
version: "3.1"
services:
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: MYSQL_ROOT_PASSWORD