# Remove index.php$
if ($request_uri ~* "^(.*/)index\.php$") {
return 301 $1;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
# Remove from everywhere index.php
if ($request_uri ~* "^(./)index.php(/?)(.)") {
php file |
#!/bin/bash | |
TELEGRAM_BOT_TOKEN="YOUR_TELEGRAM_BOT_TOKEN" | |
TELEGRAM_CHAT_ID="TELEGRAM_CHAT_ID" | |
TELEGRAM_API_URL="https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendDocument" | |
STORAGE_PATH="/path/to/storage/folder" | |
PATH="/tmp/storage-backup" # temporary path to store backups | |
DATETIME=$(/usr/bin/date "+%F-%H-%M-%S") # get datetime in the format YYYY-MM-DD HH:MM:SS | |
FILENAME=$(printf "storage-backup-%s" "${DATETIME}") # form file name using the format | |
ZIP=$(printf "%s.zip" "${FILENAME}") # append ".zip" extension to resultant name |
<?php | |
// The original Illuminate\Foundation\Auth\EmailVerificationRequest which contains code that requires user to be logged in | |
// So that the verification process can work, since it's retrieving the user from the $request object | |
// Here, we are reading the id parameter from the route and using it to find the correct User model instead | |
// IMPORTANT NOTES: | |
// 1. This will only work with the App\Models\User model | |
// 2. Don't forget to remove the (auth) middleware from the (verification.verify) route |
# Remove index.php$
if ($request_uri ~* "^(.*/)index\.php$") {
return 301 $1;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
# Remove from everywhere index.php
if ($request_uri ~* "^(./)index.php(/?)(.)") {
<?php //php 7.2.24 | |
declare(strict_types = 1); | |
class User implements Serializable, JsonSerializable { | |
private $id; /** @var string user id */ | |
private $firstname; /** @var string user's firstname */ | |
private $lastname; /** @var string user's lastname */ | |
private $email; /** @var string user's email */ |
<?php //php 7.2.24 | |
declare(strict_types = 1); // Necessary for type hinting to work | |
class CustomArray implements SeekableIterator, ArrayAccess, Countable { | |
private $arr; /** @var array contains the underlying array */ | |
private $position; /** @var int contains the current position of the iterator */ | |
private $size; /** @var int contains the current size of the array */ | |
/** |
package app; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
import java.net.Socket; | |
import java.util.Scanner; | |
public class ClientApp { | |
public static void main(String[] args) throws Exception { | |
Scanner in = new Scanner(System.in); |
package app; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
public class App { | |
private static final int POOL_SIZE = 10; | |
public static void main(String[] args) throws Exception { |
package app; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
public class App { | |
public static void main(String[] args) throws Exception { | |
try (ServerSocket server = new ServerSocket(49512)) { | |
while (true) { | |
try { |
package app; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
public class App { | |
public static void main(String[] args) throws Exception { | |
int PORT_NUMBER = 45012; |