Skip to content

Instantly share code, notes, and snippets.

View bhelm's full-sized avatar

Bernd Helm bhelm

View GitHub Profile
@bhelm
bhelm / ParallelThumbnailGenerateCommand.php
Created April 29, 2021 09:10
ParallelThumbnailGenerateCommand.php
<?php
/**
* Shopware 5
* Copyright (c) shopware AG
*
* According to our dual licensing model, this program can be used either
* under the terms of the GNU Affero General Public License, version 3,
* or under a proprietary license.
*
* The texts of the GNU Affero General Public License with an additional
@bhelm
bhelm / ExportImagesCommand.php
Created April 29, 2021 08:47
Shopware 5 export image paths
<?php
namespace My\Commands;
use Doctrine\ORM\EntityManager;
use Error;
use Shopware\Commands\ShopwareCommand;
use Shopware\Models\Category\Category;
use Shopware\Models\Category\Repository;
use Shopware\Models\Snippet\Snippet;
@bhelm
bhelm / arch-chroot.sh
Created April 16, 2020 09:46
Chroot script from Archlinux (arch-chroot), works on any distri
#!/bin/bash
shopt -s extglob
# generated from util-linux source: libmount/src/utils.c
declare -A pseudofs_types=([anon_inodefs]=1
[autofs]=1
[bdev]=1
[bpf]=1
[binfmt_misc]=1
@bhelm
bhelm / tocsv.js
Last active July 4, 2019 14:26 — forked from JeffJacobson/tocsv.js
JavaScript object to CSV
/**
* Converts a value to a string appropriate for entry into a CSV table. E.g., a string value will be surrounded by quotes.
* @param {string|number|object} theValue
*/
function toCsvValue(theValue) {
let t = typeof theValue,
output
let sDelimiter = '"'