Skip to content

Instantly share code, notes, and snippets.

<?php
class Noise
{
private $boundImage = null;
private $cachedValues = [];
private $amplitude = 0.5;
private $frequency = 2.0;
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
/**
* Eingabe
*/
$options = [
'help'=> ['title'=> 'Benötige allgemeine Hilfe','selected'=>false],
'feedback'=> ['title'=> 'Benötige Feedback zum Script','selected'=>false],
'bug'=> ['title'=> 'Fehler entdeckt','selected'=>false],
<!DOCTYPE html>
<html lang="de">
<head>
<title>Kontakt</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
<header class="jumbotron">
<div class="container">
@BlackScorp
BlackScorp / index.php
Created November 28, 2019 19:15
Code zum Video https://youtu.be/IJXfBqo3WOo ein BG.jpg kannst du hier heraussuchen https://pixabay.com/de/images/search/advent/
<?php
error_reporting();
ini_set('display_errors', 'On');
$start = DateTime::createFromFormat('Y-m-d', '2019-12-01');
$end = clone $start;
$end->modify('+24 days');
$interval = DateInterval::createFromDateString('1 day');
@BlackScorp
BlackScorp / Logger.php
Created September 25, 2019 20:10
Code zum Youtube Tutorial https://youtu.be/y-GsYEnguAU
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
define('EMERGENCY', 'emergency');
define('ALERT', 'alert');
define('CRITICAL', 'critical');
define('ERROR', 'error');
define('WARNING', 'warning');
@BlackScorp
BlackScorp / index.php
Created September 18, 2019 19:20
Code for the Youtube Tutorial https://youtu.be/1kRy0JgPC04
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
$url = 'https://www.green-secure.de/podcast/';
$domDocument = new DOMDocument();
<?php
function event(string $name, array $data = [],callable $action = null,int $priority = 0){
static $events = [];
if($action){
$events[$name][]=[
'priority' => $priority,
'action' => $action
];
return null;
}
@BlackScorp
BlackScorp / Template.php
Created September 5, 2019 16:00
Code for the Youtube Tutorial https://youtu.be/g-rUVNo0FWc
<?php
function render(string $path, array $data) {
if (defined('TEMPLATE_DIR')) {
$path = TEMPLATE_DIR . DIRECTORY_SEPARATOR . $path;
}
if (!is_file($path)) {
trigger_error('Datei "' . $path . '" wurde nicht gefunden');
return null;
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
function render(string $path,array $data){
if(!is_file($path)){
trigger_error('Datei "'.$path.'" wurde nicht gefunden');
return null;
}
@BlackScorp
BlackScorp / export.php
Last active August 21, 2019 20:33
Beispiel Code für das Youtube Video https://youtu.be/vE7AXqs2dKk
<?php
error_reporting(-1);
ini_set('display_errors', 'On');
$array = [
['Row 1','Row 2','Row 3'],
['Col 1','Col 2','Col 3'],
['Col 1','Col 2','Col 3'],
];