Skip to content

Instantly share code, notes, and snippets.

View voicecode-bv's full-sized avatar

Michael Blijleven voicecode-bv

View GitHub Profile
@voicecode-bv
voicecode-bv / 1. TransferDomainsController.php
Last active September 6, 2022 17:13
Transfer domain and subscriptions to another Google reseller
<?php
namespace App\Http\Controllers\Customer\Contact\GoogleWorkspace;
use App\Http\Controllers\Controller;
use App\Http\Requests\Customer\GoogleWorkspace\Transfers\TransferSubscriptionsRequest;
use App\Models\Contact;
use App\Services\GoogleSubscriptionService;
use Google\Service\Exception;
@voicecode-bv
voicecode-bv / gist:13082913a44d5c663a8cde01c70d2baa
Created June 7, 2019 11:26
Update ImageMagic policies to work with Ghostscript on Laravel Forge
sudo -s (or su -)
apt install ghostscript -y
ln -s /usr/local/bin/gs /usr/bin/gs
cp /etc/ImageMagick-6/policy.xml /etc/ImageMagick-6/policy.xml.bak
sed -i "s/rights\=\"none\" pattern\=\"PS\"/rights\=\"read\|write\" pattern\=\"PS\"/" /etc/ImageMagick-6/policy.xml
sed -i "s/rights\=\"none\" pattern\=\"EPI\"/rights\=\"read\|write\" pattern\=\"EPI\"/" /etc/ImageMagick-6/policy.xml
sed -i "s/rights\=\"none\" pattern\=\"PDF\"/rights\=\"read\|write\" pattern\=\"PDF\"/" /etc/ImageMagick-6/policy.xml
sed -i "s/rights\=\"none\" pattern\=\"XPS\"/rights\=\"read\|write\" pattern\=\"XPS\"/" /etc/ImageMagick-6/policy.xml
service php7.3-fpm restart && service nginx restart
@voicecode-bv
voicecode-bv / imagick3.4.4-PHP7.3-forge.sh
Last active June 7, 2019 11:13 — forked from rostockahoi/imagick3.4.3-PHP7.2-forge.sh
Install Imagick 3.4.4 on PHP 7.2 server (Laravel Forge)
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
apt-get install pkg-config libmagickwand-dev -y
cd /tmp
wget https://pecl.php.net/get/imagick-3.4.4.tgz
tar xvzf imagick-3.4.4.tgz