#!/usr/bin/env bash
# set this to point values (1pt = 25.4 mm)
cropLeft=0
cropRight=298
cropTop=421
cropBottom=0
This file contains 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 characters
// overwrite | |
let console_backup = console; | |
console = { | |
log: msg => {}, | |
info: msg => {}, | |
warn: msg => { | |
// only show specific errors | |
if (msg !== 'hide this specific warning') { | |
console_backup.warn(e); | |
} |
This file contains 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 characters
$date_in_utc = '2024-01-01 12:00:00'; | |
// this both outputs "2024-01-01 13:00:00" | |
date('Y-m-d H:i:s', strtotime($date_in_utc . ' UTC')); | |
(new \DateTime($date_in_utc, new \DateTimeZone('UTC')))->setTimezone(new \DateTimeZone(date_default_timezone_get()))->format('Y-m-d H:i:s')); | |
Carbon::createFromFormat('Y-m-d H:i:s', $date_in_utc, 'UTC')->setTimezone(date_default_timezone_get())->toDateTimeString(); |
This file contains 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 characters
// 32-bit | |
if (PHP_INT_SIZE == 4) { | |
echo date('Y-m-d',strtotime('2040-01-10T16:41:07+01:00')); | |
} | |
// 64-bit | |
if (PHP_INT_SIZE == 8) { | |
echo (new \DateTime('2040-01-10T16:41:07+01:00'))->format('Y-m-d'); | |
} |
This file contains 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 characters
use Illuminate\Support\Carbon; | |
// create | |
Carbon::now(); | |
Carbon::yesterday(); | |
Carbon::today(); | |
Carbon::now(); | |
Carbon::now('Europe/London'); | |
Carbon::tomorrow(); | |
Carbon::createFromDate($year, $month, $day, $tz); |
-
prefix query with
EXPLAIN ANALYZE
:EXPLAIN ANALYZE SELECT * FROM ...
-
debug with https://explain.depesz.com
SELECT *
FROM table
WHERE
col1 = 'foo'
AND
col2 = 'foo'
AND (
col3 = 'foo'
OR
- overview: https://www.gruenderkueche.de/fachartikel/xrechnung-erstellen-so-funktioniert-es-diese-tools-gibt-es
- generator: https://xrechnungsgenerator.nortal.com
- validator: https://validator.invoice-portal.de
- php-library: https://github.com/horstoeko/zugferd
- php-visualizer: https://github.com/horstoeko/zugferdvisualizer
This file contains 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 characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Listen for Xdebug", | |
"type": "php", | |
"request": "launch", | |
"port": 9003, | |
"ignore": ["**/vendor/**/*.php"] | |
} |
NewerOlder