This file contains hidden or 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
# ════════════════════════════════════════════════════════ | |
# Bot Detection Configuration | |
# Include in http block of nginx.conf | |
# ════════════════════════════════════════════════════════ | |
# ════════════════════════════════════════════════════════ | |
# Map User-Agent to Bot Type | |
# ════════════════════════════════════════════════════════ | |
map $http_user_agent $bot_type { | |
default "user"; |
This file contains hidden or 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 calls sends an email to one recipient. | |
var mailjet = require ('node-mailjet') | |
.connect(process.env.MJ_APIKEY_PUBLIC, process.env.MJ_APIKEY_PRIVATE) | |
var request = mailjet | |
.post("send") | |
.request({ | |
"FromEmail": "caco0516@gmail.com", | |
"FromName": "noreply@growposapp.com", | |
"Subject": "Bienvenido a Grow POS", | |
"MJ-TemplateID": "103446", |
This file contains hidden or 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
from PIL import Image | |
import numpy as np | |
# Load the uploaded image | |
image_path = "/mnt/data/1.png" | |
img = Image.open(image_path) | |
# Convert image to grayscale | |
img_gray = img.convert("L") |
This file contains hidden or 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 | |
# Yêu cầu nhập mật khẩu MySQL root | |
read -sp "Enter MySQL root password: " MYSQL_ROOT_PASSWORD | |
echo "" | |
# Tạo file .my.cnf nếu chưa tồn tại | |
MY_CNF_PATH="/root/.my.cnf" | |
if [ ! -f "$MY_CNF_PATH" ]; then | |
echo "Creating .my.cnf file..." |
This file contains hidden or 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
/** | |
* Interface for the HttpClient class, defining the structure of HTTP client methods. | |
*/ | |
interface IHttpClient { | |
setBaseUrl(baseUrl: string): this | |
get<T>(url: string): Promise<T> | |
post<T>(url: string, body?: Record<string, unknown>, options?: RequestInit): Promise<T> |
This file contains hidden or 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 | |
# Replace these with your own organization and PAT | |
ORGANIZATION="YOUR_ORGANIZATION" | |
PAT="YOUR_PAT_TOKEN" | |
# Prompt for the project name | |
read -p "Enter your Azure DevOps project name: " PROJECT | |
# Prompt for the target folder |