-
Schema Organization: Description: Organize your database objects into logical schemas to improve manageability and security.
CREATE SCHEMA auth;
CREATE SCHEMA billing;
#!/bin/bash | |
# binary-compatible-proxy-generator.sh | |
# Creates a binary-compatible sandboxed proxy for ELF executables using nsjail | |
set -e | |
if [ $# -lt 1 ]; then | |
echo "Usage: $0 <original-binary> [nsjail-options]" |
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 |
#!/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 |
# Protection from Malicious Domain (ads, malware, hack scripts, fakenews and gambling ) | |
# You may not be doing it but various apps installed on your system doing it internally, so having ad blocker in Browser does not helps. | |
# Execute below command in your terminal once every week. | |
sudo chmod 774 /etc/hosts | |
curl https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts > hosts | |
sudo mv hosts /etc/hosts |
#!/bin/bash | |
# File: /usr/local/bin/configure_malloc.sh | |
set_malloc_config() { | |
local total_ram=$1 | |
local arena_max mmap_threshold trim_threshold top_pad | |
mmap_threshold=524288 # 512 KB | |
trim_threshold=524288 # 512 KB |
#!/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 && \ |
#!/bin/bash | |
# Array to store user choices | |
declare -A choices | |
# Log file | |
LOGFILE="/var/log/linux_hardening.log" | |
# Function to log messages | |
log() { |
#!/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) |