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
#!/usr/bin/env bash | |
docker run --name pgauto -it \ | |
--mount type=bind,source=${PGDATA},target=/var/lib/postgresql/data \ | |
-e TZ="Asia/Bangkok" \ | |
-e LANG="C.UTF-8" \ | |
-e POSTGRES_USER="${POSTGRES_USER}" \ | |
-e POSTGRES_PASSWORD="${POSTGRES_PASSWORD}" \ | |
-e PGAUTO_ONESHOT=yes \ | |
pgautoupgrade/pgautoupgrade:17-bookworm |
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
#!/usr/bin/env bash | |
# Print header information | |
cat << "EOF" | |
+----------------------------------------------------------------------+ | |
| Intel Gen 12/13 vGPU SR-IOV on Proxmox Host Enabler (Installer) | | |
| https://github.com/Upinel/Intel-vGPU-SRIOV-on-Proxmox | | |
+----------------------------------------------------------------------+ | |
| This source file is subject to version 2.0 of the Apache license, | | |
| that is bundled with this package in the file LICENSE, and is | |
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
async function handler(event) { | |
const request = event.request; | |
const uri = request.uri; | |
// Extract pathname and check conditions | |
const hostnameWithPath = uri.split('//').pop(); | |
const hasQuery = uri.indexOf('?') !== -1; | |
const hasExtension = uri.indexOf('.') !== -1 && uri.lastIndexOf('.') > uri.lastIndexOf('/'); | |
const pathEndWithSlash = uri.charAt(uri.length - 1) === '/'; | |
const isRootUrl = hostnameWithPath.indexOf('/') === -1 || hostnameWithPath.indexOf('/') === (hostnameWithPath.length - 1); |
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
-- Set the database name | |
SET @db_name = :database_name; | |
-- Prepare a cursor to iterate through each relevant column | |
DROP PROCEDURE IF EXISTS convert_latin1_to_utf8mb4; | |
DELIMITER // | |
CREATE PROCEDURE convert_latin1_to_utf8mb4() | |
BEGIN | |
DECLARE done INT DEFAULT FALSE; |
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
#!/usr/bin/env bash | |
# ------------------------------------------------------------------------------ | |
# Script Name: update-litespeed-cache.sh | |
# Description: This script updates the LiteSpeed Cache plugin for all WordPress | |
# installations on a DirectAdmin server. It checks for the WP-CLI | |
# tool and installs it if not found, then updates the specified plugin | |
# for each user's domains. | |
# | |
# Author: Kawin Viriyaprasopsook |
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
#!/usr/bin/env bash | |
cat <<-'EOF' > /etc/yum.repos.d/CentOS-Base.repo | |
[C6.10-base] | |
name=CentOS-6.10 - Base | |
baseurl=http://vault.centos.org/6.10/os/$basearch/ | |
gpgcheck=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 | |
enabled=1 | |
metadata_expire=never |
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
{ | |
"listeners": { | |
"*:8080": { | |
"pass": "routes/main" | |
} | |
}, | |
"routes": { | |
"main": [ | |
{ | |
"action": { |
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
# Environment variables for PostgreSQL containers | |
x-default-pg-env: &default-pg-env | |
# Set the timezone to Asia/Bangkok | |
TZ: Asia/Bangkok | |
# Username for the PostgreSQL administrative account | |
POSTGRESQL_USERNAME: postgres | |
# Name of the default PostgreSQL database | |
POSTGRESQL_DATABASE: postgres | |
# Password for the PostgreSQL administrative account | |
POSTGRESQL_PASSWORD: mysecretpassword |
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
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ | |
// © bouroo | |
//@version=5 | |
strategy("Turtle Trading Strategy with Supertrend Confirmation", overlay=true) | |
// Turtle Trading Parameters | |
length1 = input.int(20, title="Donchian Channel Length (Breakout)") | |
length2 = input.int(10, title="Donchian Channel Length (Exit)") | |
risk_pct = input.float(2.0, title="Risk Percentage per Trade") |
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
#!/usr/env/bash | |
# Thailand | |
speedtest -s 27203 | |
# Singapore | |
speedtest -s 2054 |
NewerOlder