Skip to content

Instantly share code, notes, and snippets.

View craftyoyo's full-sized avatar
🐼

pandarch craftyoyo

🐼
View GitHub Profile
server {
listen 80;
server_name play.pandarch.fr;
location / {
deny 85.171.99.193;
return 301 https://$host$request_uri;
}
}
server
<VirtualHost *:80>
ServerName sc.ysavary.fr
ProxyPreserveHost On
Header set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Methods "POST, PUT, GET, DELETE, OPTIONS"
Header always set Access-Control-Allow-Headers "Content-Type"
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:80000/
<li class="list-group-item active">
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Liquide
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Fruité</a>
<a class="dropdown-item" href="#">Boisson</a>
<a class="dropdown-item" href="#">Tabac</a>
<a class="dropdown-item" href="#">Menthe</a>
function echoBar($title, $str, $unit, $max){
$percent = floor((($str/$max)*100));
if($unit == " RPM") {
if($percent<40)
{
$color = "progress-bar-danger";
function echoBar($title, $str, $unit, $max){
$percent = floor((($str/$max)*100));
if($unit == " RPM") {
if($percent<40)
{
$color = "progress-bar-danger";
<?php
header("Content-Type: text/html; charset=utf-8");
$filedir = '/var/www/html/MC/logs/latest.log'; // relative path instead of full path
$output = shell_exec("tail -n250 {$filedir} | tac"); //exec removed
//echo str_replace(PHP_EOL, '<br />', $output); // line OK
$console = $output;
$console = preg_split('/[\r\n]+/', $output);
<?php
unset($s_ndd);
unset($ignore);
$numarg = $argc - 1;
foreach ($argv as $k => $v)
{
if ($v) == '-R';
#!/usr/bin/php
<?php
/**
* Script for creating a new Apache2 VHost and MySQL User + Database.
*
* @author Julius Beckmann (github@h4cc.de)
*/
if(6 != count($argv)) {
echo "--- New Vhost ---
@craftyoyo
craftyoyo / new_vhost
Created April 10, 2020 09:32 — forked from h4cc/new_vhost
Script for creating a new Apache2 VHost and MySQL User + Database.
#!/usr/bin/php
<?php
/**
* Script for creating a new Apache2 VHost and MySQL User + Database.
*
* @author Julius Beckmann (github@h4cc.de)
*/
if(6 != count($argv)) {
echo "--- New Vhost ---