Skip to content

Instantly share code, notes, and snippets.

@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 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');
<!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">
<?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],
<?php
class Noise
{
private $boundImage = null;
private $cachedValues = [];
private $amplitude = 0.5;
private $frequency = 2.0;
@BlackScorp
BlackScorp / utills.js
Created April 30, 2020 17:08
Kleine Utitiles
document.addEventListener("DOMContentLoaded", function (event) {
let htmlRoot = document.querySelector('html');
htmlRoot.classList.add('js');
htmlRoot.classList.remove('no-js');
let body = document.querySelector('body');
body.addEventListener('click', function (event) {
if (event.target.getAttribute('data-confirm')) {
<form method="POST" action="upload.php" enctype="multipart/form-data">
<input type="file" name="datei[]">
<button type="submit">Upload</button>
</form>
@BlackScorp
BlackScorp / index.php
Created July 2, 2020 13:55
Beispiel für das Videotutorial https://youtu.be/62FOiOSBxsg
<?php
error_reporting(E_ALL);
ini_set('display_errors','On');
require_once __DIR__.'/vendor/autoload.php';
$imageBase64 = base64_encode(file_get_contents('https://placekitten.com/200/287'));
$transport = new Swift_SmtpTransport('smtp.gmail.com', 465,'ssl');
$transport->setUsername('gmail adresse mit @gmail.com');
$transport->setPassword('passwort aus APP Passwords');
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
Options +FollowSymlinks -Indexes
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME) !-d
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Gewinnspiel</title>
<style>
body{
position: absolute;
top:0;
left:0;