Skip to content

Instantly share code, notes, and snippets.

View Nerahikada's full-sized avatar
➡️
left

ねらひかだ Nerahikada

➡️
left
View GitHub Profile
@Nerahikada
Nerahikada / win2unix.php
Created October 9, 2019 09:59
\r\n → \n
<?php
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator("."));
foreach($iterator as $fileInfo){
if($fileInfo->isFile()){
$path = $fileInfo->getPathname();
file_put_contents($path, str_replace("\r\n", "\n", file_get_contents($path), $count));
if($count > 0){
echo $path . ": " . $count . "\n";
}
}
@Nerahikada
Nerahikada / unknown.php
Last active March 28, 2018 11:17
Do you know how does this work?
<?php
namespace Nerahikada;
use pocketmine\event\player\PlayerJoinEvent;
use pocketmine\event\Listener;
use pocketmine\plugin\PluginBase;
class unknown extends PluginBase implements Listener{