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
#!/bin/bash | |
# This script automates the process of importing data from a JSON file into a specified collection | |
# within a PocketBase instance. It requires the PocketBase URL, the collection name, and the path to the | |
# JSON file as inputs. The script handles authentication using admin credentials, which can be loaded | |
# from a .env file or entered manually by the user if the file is not found. | |
# | |
# Key functionalities: | |
# - Validates input parameters, including the PocketBase URL, collection name, and JSON file path. | |
# - Handles authentication with the PocketBase API to retrieve an access token using admin credentials. |
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
0rz.tw | |
126.am | |
1link.in | |
1tk.us | |
1un.fr | |
1url.com | |
1url.cz | |
1-url.net | |
1wb2.net | |
23o.net |
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
#!/bin/bash | |
# Script Description: | |
# This Bash script fetches JSON data associated with a BuyMeACoffee profile | |
# for a specified username and decodes specific HTML entities in the retrieved data. | |
# Function to decode HTML entities in a string | |
html_entity_decode() { | |
# Use sed to replace HTML entity " with a double quote (") | |
echo "$1" | sed -e 's/"/"/g' |
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
# Slugify | |
# | |
# URL: https://duncanlock.net/blog/2021/06/15/good-simple-bash-slugify-function/ | |
# | |
# Transliterate everything to ASCII | |
# Strip out apostrophes | |
# Anything that's not a letter or number to a dash | |
# Strip leading & trailing dashes | |
# Everything to lowercase | |
function slugify() { |
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
<?php | |
function validateDomain(string $domain) :bool { | |
/** | |
* First remove any whitespaces and set string to lowercase. | |
*/ | |
$domain = trim($domain); | |
$domain = mb_strtolower($domain, "UTF-8"); | |
/** |
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
#!/bin/bash | |
# | |
# URL Status Checker | |
# | |
# This script reads a file containing URLs (one per line) and checks their HTTP status codes. | |
# The results are written to a temporary file located in the ~/tmp directory. | |
# It utilizes curl to perform HTTP HEAD requests and captures the status codes. | |
# |
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
// Displays the statictics of the player | |
COMMAND:stats(playerid, params[]) | |
{ | |
// Setup local variables | |
new StatsMsg[1000], TitleMsg[128], StatsPlayer; | |
// Send the command to all admins so they can see it | |
SendAdminText(playerid, "/stats", params); | |
// Check if the player has logged in |
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 file holds all functions for the toll-system | |
forward Toll(); | |
public Toll() | |
{ | |
// Loop through all players | |
for(new playerid; playerid < MAX_PLAYERS; playerid++) | |
{ | |
// If the player isn't connected, skip to the next player | |
if (APlayerData[playerid][LoggedIn] == 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
// This file holds all functions for the toll-system | |
forward Toll(); | |
public Toll() | |
{ | |
// Loop through all players | |
for(new playerid; playerid < MAX_PLAYERS; playerid++) | |
{ | |
// If the player isn't connected, skip to the next player | |
if(APlayerData[playerid][LoggedIn] == false) continue; |
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
// place this somewhere in ~/pawno/include/PPC_Speedometer.inc | |
// i recommend at line 340, right after the money and score check | |
if (GetPVarInt(playerid, "AdminLevel") != APlayerData[playerid][PlayerLevel]) | |
SetPVarInt(playerid, "AdminLevel", APlayerData[playerid][PlayerLevel]); |
NewerOlder