Skip to content

Instantly share code, notes, and snippets.

View fishuke's full-sized avatar
Coding

fishuke

Coding
View GitHub Profile
<?php
/**
* Plugin Name: YITH Waitlist API
* Description: Custom API to fetch YITH waitlist data via HTTP requests
* Version: 1.0.0
*/
// Prevent direct access
if (!defined('ABSPATH')) {
exit;
@fishuke
fishuke / script.js
Last active February 3, 2025 13:30
script.js
tst = document.querySelector('input[type="email"]');
tst.value = 'asdd';
tst.value;
@fishuke
fishuke / backup.sh
Created January 4, 2025 04:04
postgres-backup
#!/bin/bash
# Install AWS CLI (using apt-get for Debian-based systems)
apt-get update && apt-get install -y awscli
# Set backup name prefix if provided, otherwise use empty string
BACKUP_PREFIX="${BACKUP_NAME:+${BACKUP_NAME}_}"
# Perform the PostgreSQL dump
pg_dump --format=custom --no-acl --no-owner --username=$POSTGRES_USER $POSTGRES_DB > /tmp/backup.dump
@fishuke
fishuke / backup.sh
Last active January 4, 2025 03:53
postgis-backup
#!/bin/bash
apk add --no-cache aws-cli
# Set backup name prefix if provided, otherwise use empty string
BACKUP_PREFIX="${BACKUP_NAME:+${BACKUP_NAME}_}"
pg_dump --format=custom --no-acl --no-owner --username=$POSTGRES_USER $POSTGRES_DB > /tmp/backup.dump
[ $? -eq 0 ] || { echo "Error creating backup. Exiting..."; exit 1; }
aws s3 cp /tmp/backup.dump "s3://$S3_BUCKET_NAME/${BACKUP_PREFIX}backup_$(date +%F_%H-%M-%S).dump" --endpoint-url=$S3_URL
@fishuke
fishuke / backup.sh
Last active December 27, 2024 13:53
backup
#!/bin/bash
apk add --no-cache aws-cli
export AWS_ACCESS_KEY_ID="0f7324bda21608af1b192376a550a6eb"
export AWS_SECRET_ACCESS_KEY="872eaa73eb027b39f4859e48c788e8279724a5dc579fe31eeff0d90fdf728fb9"
export AWS_DEFAULT_REGION="us-east-1"
pg_dump --format=custom --no-acl --no-owner --username=$POSTGRES_USER $POSTGRES_DB > /tmp/backup.dump
[ $? -eq 0 ] || { echo "Error creating backup. Exiting..."; exit 1; }
aws s3 cp /tmp/backup.dump s3://sixtynine-backups/backup_$(date +%F_%H-%M-%S).dump --endpoint-url=https://6b6568edfbac3b9600fff1b56b988488.r2.cloudflarestorage.com
version: "3.5"
networks:
default:
attachable: true
name: "${NEKO_ROOMS_TRAEFIK_NETWORK}"
services:
traefik:
image: "traefik:2.4"
tls:
options:
default:
minVersion: VersionTLS12
sniStrict: true
cipherSuites:
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256