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
import translate from "translate"; | |
translate.engine = "google"; // Or "yandex", "libre", "deepl" | |
translate.key = ""; | |
const langSource = "fr"; | |
const langDest = "tr"; | |
//Read langSource.ini line by line | |
import fs from "fs"; |
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 | |
declare(strict_types=1); | |
require "vendor/autoload.php"; | |
$outputData = [ | |
"ocean" => 0, | |
"plains" => 1, | |
"desert" => 2, |
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 | |
$originalPath = "/root/servers/miscs/converting/lobby"; | |
$backupPath = "/root/servers/miscs/converting/backup"; //this will create a folder under this one with the name of the world | |
$providerManager = new WorldProviderManager(); | |
$writableFormats = array_filter($providerManager->getAvailableProviders(), fn(WorldProviderManagerEntry $class) => $class instanceof WritableWorldProviderManagerEntry); | |
$requiredOpts = [ | |
"world" => "path to the input world for conversion", | |
"backup" => "path to back up the original files", |
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 | |
$height = 64; | |
$width = 64; | |
switch (strlen($sender->getSkin()->getSkinData())) { | |
case 64 * 32 * 4: | |
$height = 32; | |
break; | |
case 64 * 64 * 4: | |
break; |
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 | |
error_reporting(E_ERROR | E_PARSE); | |
use JetBrains\PhpStorm\ArrayShape; | |
class TestWork extends Thread { | |
//updated version that works with pThreads v3.2.1 and php 7.3.23 | |
protected $complete; | |
protected $result; | |
//$pData is the data sent to your worker thread to do it's job. | |
public function __construct($ip) { |