Last active
October 6, 2024 10:48
-
-
Save iamdanre/771c67c62cbfd734f587fb9a58a2766a to your computer and use it in GitHub Desktop.
Revisions
-
iamdanre revised this gist
Oct 6, 2024 . 1 changed file with 113 additions and 111 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,121 +2,123 @@ <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>localhost</title> <style> body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background-color: #282c34; color: #ffffff; } header { text-align: center; padding: 20px 0; margin: 0; } .container { width: 90%; margin: 0 auto; max-width: 1200px; } .flex-container { display: flex; flex-wrap: wrap; margin: 20px 0; } .flex-item { flex: 1 1 30%; margin: 0.5%; } .btn { display: flex; justify-content: center; align-items: center; padding: 10px 15px; color: #ffffff; text-decoration: none; border: 2px solid #ffffff; border-radius: 5px; transition: background-color 0.3s, color 0.3s; background-color: #343a40; } .btn:hover { background-color: #1c1f24; color: #ffffff; } .alert { padding: 10px 15px; margin: 10px 0; border-radius: 5px; color: #ffffff; } .alert-success { background-color: #28a745; } .alert-danger { background-color: #dc3545; } </style> </head> <body> <header class="container"> <h1>MAMP Sites</h1> </header> <main class="container"> <div class="flex-container"> <?php $dir = '/Applications/MAMP/htdocs'; $sites = scandir($dir); $sites = array_diff($sites, ['..', '.', '.DS_Store', 'index.php']); foreach ($sites as $site) { echo "<div class='flex-item'><a href='$site/public_html' class='btn'>$site</a></div>"; } ?> </div> <div class="flex-container"> <div class="flex-item"> <a href="/phpmyadmin" class="btn">phpMyAdmin</a> </div> <div class="flex-item"> <a href="/MAMP/opcache.php" class="btn">OPcache</a> </div> </div> <?php $output = shell_exec('pgrep mongod'); if ($output) { echo "<div class='alert alert-success'>MongoDB is running</div>"; } else { echo "<div class='alert alert-danger'>MongoDB is not running</div>"; } $output = shell_exec('pgrep mailpit'); if ($output) { echo "<div class='alert alert-success'>Mailpit is running</div>"; } else { echo "<div class='alert alert-danger'>Mailpit is not running</div>"; } phpinfo(); ?> </main> </body> -
iamdanre revised this gist
Aug 19, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -84,7 +84,7 @@ $sites = scandir($dir); $sites = array_diff($sites, array('..', '.', '.DS_Store', 'index.php')); foreach ($sites as $site) { echo "<div class='flex-item'><a href='$site/public_html' class='btn'>$site</a></div>"; } ?> </div> -
iamdanre created this gist
Aug 19, 2024 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,123 @@ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>localhost</title> <style> body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background-color: #282c34; color: #ffffff; } header { text-align: center; padding: 20px 0; margin: 0; } .container { width: 90%; margin: 0 auto; max-width: 1200px; } .flex-container { display: flex; flex-wrap: wrap; margin: 20px 0; } .flex-item { flex: 1 1 30%; margin: 0.5%; } .btn { display: flex; justify-content: center; align-items: center; padding: 10px 15px; color: #ffffff; text-decoration: none; border: 2px solid #ffffff; border-radius: 5px; transition: background-color 0.3s, color 0.3s; background-color: #343a40; } .btn:hover { background-color: #1c1f24; color: #ffffff; } .alert { padding: 10px 15px; margin: 10px 0; border-radius: 5px; color: #ffffff; } .alert-success { background-color: #28a745; } .alert-danger { background-color: #dc3545; } </style> </head> <body> <header class="container"> <h1>MAMP Sites</h1> </header> <main class="container"> <div class="flex-container"> <?php $dir = '/Applications/MAMP/htdocs'; $sites = scandir($dir); $sites = array_diff($sites, array('..', '.', '.DS_Store', 'index.php')); foreach ($sites as $site) { echo "<div class='flex-item'><a href='http://$site' class='btn'>$site</a></div>"; } ?> </div> <div class="flex-container"> <div class="flex-item"> <a href="/phpmyadmin" class="btn">phpMyAdmin</a> </div> <div class="flex-item"> <a href="/MAMP/opcache.php" class="btn">OPcache</a> </div> </div> <?php $output = shell_exec('pgrep mongod'); if ($output) { echo "<div class='alert alert-success'>MongoDB is running</div>"; } else { echo "<div class='alert alert-danger'>MongoDB is not running</div>"; } $output = shell_exec('pgrep mailpit'); if ($output) { echo "<div class='alert alert-success'>Mailpit is running</div>"; } else { echo "<div class='alert alert-danger'>Mailpit is not running</div>"; } phpinfo(); ?> </main> </body> </html>