ServiceManager
- Config Key:
service_manager - Interface:
Zend\ModuleManager\Feature\ProviderInterface
ControllerLoader
| #!/bin/bash | |
| svn_path="http://davahome-minecraft.svn/trunk/MinecraftInstance/" | |
| live_folder="minecraft_instance" | |
| backup_folder="__minecraft_instance" | |
| export_folder="__export" | |
| echo "Exporting from svn: "${svn_path} | |
| # Remove old export folder if exists |
| # Reset | |
| Color_None='\e[0m' | |
| # Regular Colors | |
| Color_Black='\e[0;30m' | |
| Color_Red='\e[0;31m' | |
| Color_Green='\e[0;32m' | |
| Color_Yellow='\e[0;33m' | |
| Color_Blue='\e[0;34m' | |
| Color_Purple='\e[0;35m' |
| <?php | |
| /** | |
| * A wrapper class for PHP fork functionality | |
| * | |
| * @author dava | |
| * @since 2015-10-27 | |
| */ | |
| class PcntlFork | |
| { |
| using System.Drawing; | |
| using System.Drawing.Imaging; | |
| static class ImageGreyscaleExtension | |
| { | |
| /// <summary> | |
| /// Returns the grey scaled image | |
| /// </summary> | |
| /// <param name="image"></param> | |
| /// <returns></returns> |
| using System.Diagnostics; | |
| public class InstanceDetector | |
| { | |
| protected Process GetCurrentProcess() | |
| { | |
| return Process.GetCurrentProcess(); | |
| } | |
| protected Process[] GetRunningProcesses() |
| <?php | |
| /** | |
| * The same logic as the function but as a class | |
| */ | |
| class Hash { | |
| private const PASSWORD_ALGO = 'sha512'; // hash will have 128 chars | |
| private const PASSWORD_SALT = 'change_me_pls'; // a static string | |
| private const PASSWORD_CYCLES = 12345; // number between 10.000 and 20.000 | |
| private const PASSWORD_DIVERSITY = 3; // number greater than 2 |
| <?php | |
| class Brainfuck | |
| { | |
| /** | |
| * Returns the string a simple brainfuck sequence (only + and .) | |
| * | |
| * @param string $text | |
| * | |
| * @return string |
| #!/bin/bash | |
| find . -name "composer.phar" -type f -print0 | xargs -0 -i{} php {} self-update |
| <?php | |
| /** | |
| * Usage: php sol.php <amount of sols> | |
| * | |
| */ | |
| date_default_timezone_set('UTC'); | |
| define('DAY_MARS', 3600 * 24 + 39 * 60 + 35); // 24h 39m 35s | |
| define('DAY_EARTH', 3600 * 24); |