Skip to content

Instantly share code, notes, and snippets.

View michitheonlyone's full-sized avatar
🏠
Working from home

Michael Ihde michitheonlyone

🏠
Working from home
View GitHub Profile
function asyncFuncWithPromise(): Promise<string> {
return new Promise((resolve) => {
setTimeout(() => {
resolve('asyncFuncWithPromise :: resolved after 1 second');
}, 1000);
});
}
async function asyncFuncWithAwait(): Promise<string> {
await asyncFuncWithPromise();
@michitheonlyone
michitheonlyone / cd-php-cli-with-xdebug.bash
Created August 3, 2023 11:52
Run PHP from the comandline terminal (cmd) with xdebug enabled for listener in php storm
php -dxdebug.mode=debug -dxdebug.client_host=127.0.0.1 -dxdebug.client_port=9003 -dxdebug.start_with_request=yes bin/console
@michitheonlyone
michitheonlyone / wichtigste-html-elemente.html
Last active May 25, 2024 22:56
Diese HTML Elemente sind die wichtigsten
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Beispieldokument mit den wichtigsten HTML-Tags">
<title>Wichtige HTML-Tags</title>
<link rel="stylesheet" href="styles.css">
<style>
@michitheonlyone
michitheonlyone / rating.html
Created June 15, 2024 21:21
Star Rating HTML
<tr>
<!--<td style="width: 100%">-->
<td>
<b>Fragetitel</b>
<br />Description frage beschreibung
</td>
<td>
<input type="hidden" value="" name="emoji-rating" id="emoji-rating" />
<div class="btn-group">
<button type="button" class="btn btn-outline-secondary btnrating" data-attr="1" id="rating-star-1">
@michitheonlyone
michitheonlyone / signaturepad.html.twig
Last active June 18, 2024 03:10
Signature Pad for Symfony Forms (it can be used in any website to create digital signatures with a pen on touchscreen
{#
Signature Pad for Symfony Forms
© 2024 by Michael Ihde wemida.com
https://github.com/wemida
Variables to use with include:
{% include with ... %} => see below example
{{ sig_title ?? 'E-Signature' }}
{{ sig_info_text ?? 'Sign in the canvas below and save your signature as an image!' }}
{{ sig_canvas_id ?? 'sig-canvas' }}
<?php declare(strict_types=1);
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation\Versioned;
trait AssigneableEntityTrait
{
#[ORM\ManyToOne]