-
Schema Organization: Description: Organize your database objects into logical schemas to improve manageability and security.
CREATE SCHEMA auth;
CREATE SCHEMA billing;
#!/bin/bash | |
# Exit immediately if a command exits with a non-zero status | |
set -e | |
# Function to check if the script is run as root | |
check_root() { | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 |
#!/bin/bash | |
set -e # Exit immediately if a command exits with a non-zero status. | |
# Configuration | |
APT_PACKAGES="fd-find ripgrep bat exa procs zoxide git-delta hyperfine dust-zsh broot lsd bottom" | |
SHELL_CONFIG_FILES=("$HOME/.bashrc" "$HOME/.bash_profile" "$HOME/.zshrc") | |
# Logging functions | |
log_info() { |
## Colorize the ls output ## | |
alias ls='ls --color=auto' | |
alias ll='ls -lA --color=auto' | |
alias la='ls -la --color=auto' | |
alias lt='ls -ltr --color=auto' | |
# update hosts file | |
alias update_dns_hosts='sudo chmod 774 /etc/hosts && \ | |
curl https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts > hosts && \ | |
sudo mv hosts /etc/hosts && \ |
echo 'export DEB_CFLAGS_MAINT_APPEND="-O3 -march=native -ftree-vectorize -flto -fprefetch-loop-arrays"' | sudo tee -a /etc/dpkg/buildflags.conf | |
echo 'export DEB_CXXFLAGS_MAINT_APPEND="-O3 -march=native -ftree-vectorize -flto -fprefetch-loop-arrays"' | sudo tee -a /etc/dpkg/buildflags.conf |
import pymysql | |
import traceback | |
import logging | |
from concurrent.futures import ThreadPoolExecutor, as_completed | |
from contextlib import contextmanager | |
# Set up logging | |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') | |
logger = logging.getLogger(__name__) |
#!/bin/bash | |
# Configuration variables | |
POSTGRES_VERSION="16.3" | |
POSTGRES_PREFIX="$HOME/pgsql" | |
DATA_DIR="$POSTGRES_PREFIX/data" | |
LOGFILE="$POSTGRES_PREFIX/logfile" | |
BUILD_DIR="$HOME/postgresql-build" | |
PYTHON3_PATH=$(which python3) |
#!/bin/bash | |
# Configuration | |
NODE_APP="your-app.js" | |
CGROUP_NAME="nodejs_group" | |
MEMORY_LIMIT="4G" | |
SWAP_SIZE="8G" | |
SWAPFILE="/swapfile" | |
SWAPPINESS=60 | |
ZSWAP_ENABLED=1 |
import polars as pl | |
import os | |
import time | |
from threading import Thread, Event, RLock, Lock | |
from typing import List | |
import uuid | |
def synchronized(lock): | |
"""Synchronization decorator.""" |
#!/bin/bash | |
# Set variables for key files | |
PRIVATE_KEY_FILE="/etc/ssh/ecdh_private_key.pem" | |
PUBLIC_KEY_FILE="/etc/ssh/ecdh_public_key.pem" | |
SSH_CONFIG_FILE="/etc/ssh/sshd_config" | |
# Function to handle errors | |
handle_error() { | |
echo "Error: $1" |