Skip to content

Instantly share code, notes, and snippets.

View T3chW1zard's full-sized avatar

Andre Hoffmann T3chW1zard

View GitHub Profile
@T3chW1zard
T3chW1zard / PdfExport.php
Last active January 23, 2022 09:27
Chrome headless with Symfony/Process and PHP Version 8
<?php
declare(strict_types=1);
namespace App\Service;
use Doctrine\Common\Collections\ArrayCollection;
use Psr\Log\LoggerInterface;
use Symfony\Component\Process\Process;
@T3chW1zard
T3chW1zard / JSON-Groovy-WithNumbersFix.json.groovy
Last active January 31, 2022 07:30
JSON-Groovy-WithNumbersFix
/*
* Available context bindings:
* COLUMNS List<DataColumn>
* ROWS Iterable<DataRow>
* OUT { append() }
* FORMATTER { format(row, col); formatValue(Object, col) }
* TRANSPOSED Boolean
* plus ALL_COLUMNS, TABLE, DIALECT
*
* where:
/*
* Available context bindings:
* COLUMNS List<DataColumn>
* ROWS Iterable<DataRow>
* OUT { append() }
* FORMATTER { format(row, col); formatValue(Object, col) }
* TRANSPOSED Boolean
* plus ALL_COLUMNS, TABLE, DIALECT
*
* where:
@T3chW1zard
T3chW1zard / SQL-Inserts-MultirowSynthax.sql.groovy
Last active April 21, 2020 10:35 — forked from leo-from-spb/SQL-Inserts-MultirowSynthax.sql.groovy
DataGrip data exporting script (1000 inserts at a time)
SEP = ", "
QUOTE = "\'"
NEWLINE = System.getProperty("line.separator")
begin = true
maxLines = 1000
currentLine = 0
def record(columns, dataRow) {
currentLine = currentLine + 1