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
/(ΜΕ[\s|-]?\d{5})|(ΑΜ[\s|-]?\d{5})|(ΔΣ[\s|-]?\d{2,3}[\s|-]?\d{0,3})|(ΑΟ[\s|-]?\d{3}[\s|-]\d{2})|(Α\s?[Α|Ο][\s|-]?\d{3})|(Ρ[\s|-]?\d{5})|(Τ[Α|Χ][\s|-]?\d{5})|(ΔΟΚ[\s|-]?\d{3,5})|(ΑΝΠ[\s|-]?\d{4})|(ΙΟ[\s|-]?\d{5})|([Π|Ε|Λ|Ξ][Σ|Α|Ν][\s|-]?\d{4,6})|([Α|Β|Ε|Ζ|Η|Ι|Κ|Μ|Ν|Ν|Ο|Ρ|Τ|Υ|Χ]{3}[\s|-]?\d{1,4})|([Α|Β|Ε|Ζ|Η|Ι|Κ|Μ|Ν|Ν|Ο|Ρ|Τ|Υ|Χ]{2}[\s|-]?\d{4})/ |
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
export const cache = { | |
data: new Map(), | |
timers: new Map(), | |
set: (k: string, v: any, ttl: number) => { | |
if (cache.timers.has(k)) { | |
clearTimeout(cache.timers.get(k)) | |
} | |
cache.timers.set( | |
k, | |
setTimeout(() => cache.delete(k), ttl * 1000) |
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 | |
# KNOWN BUG: DNS records of subdomains created as main websites will be stored in the main domain's website | |
CF_API_TOKEN="" | |
ENH_DOMAIN="" | |
ENH_ORG_ID="" | |
ENH_API_TOKEN="" | |
DRY=true |
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
version: '2.1' | |
services: | |
borgmatic-mailcow: | |
image: ghcr.io/borgmatic-collective/borgmatic | |
hostname: mailcow | |
restart: always | |
dns: ${IPV4_NETWORK:-172.22.1}.254 | |
volumes: | |
- vmail-vol-1:/mnt/source/vmail:ro |
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
CREATE EXTENSION IF NOT EXISTS "unaccent"; | |
CREATE OR REPLACE FUNCTION slugify(t text) RETURNS text | |
AS $$ | |
BEGIN | |
t := lower(t); | |
-- german | |
t := replace(t, 'ä', 'ae'); | |
t := replace(t, 'ö', 'oe'); | |
t := replace(t, 'ü', 'ue'); |
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 | |
grep -h -s --color=never '^URL=' "$@" | cut -d'=' -f2- | xargs xdg-open & |
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 | |
# Set the path to the cPanel user file | |
USERS_FILE="/etc/trueuserdomains" | |
# Loop through each cPanel user | |
while read DOMAIN USER; do | |
# Remove the colon from the end of the DOMAIN variable | |
DOMAIN=$(echo "$DOMAIN" | sed 's/:$//') | |
# Get the user's email accounts |
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
let node = document.querySelector(".nc-tab-bar .nc-fullscreen-btn") | |
// Always check if an element exists before manipulating it | |
if(node !== null) { | |
newNode = document.createElement("div") | |
newNode.classList = "flex items-center h-full mb-1px" // not all tailwind classes work, only the ones already loaded on the page | |
// here I am just duplicating the invite button and making it a print button |
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
const fs = require("fs-extra"); | |
const cheerio = require('cheerio'); | |
const crypto = require('crypto'); | |
const slug = require('slug'); | |
// recreate our assets directories aka empty them | |
fs.emptyDirSync('./assets/images'); | |
fs.emptyDirSync('./assets/styles'); | |
let buffer; |
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
cd ~/server-path && PATH=$PATH:/opt/plesk/node/16/bin/ npm install | |
cd ~/server-path && PATH=$PATH:/opt/plesk/node/16/bin/ npm run build | |
cp ~/server-path/plesk/* ~/server-path/build |