Skip to content

Instantly share code, notes, and snippets.

View binaryhq's full-sized avatar

BinaryHQ binaryhq

View GitHub Profile

How to use nginx as a reverse-proxy with letsencrypt

Your infrastructure

generated via plantuml

Imgur

Requirements

@binaryhq
binaryhq / imagemagick-svg.md
Created July 8, 2021 14:08 — forked from maxivak/imagemagick-svg.md
Issue with Carrierwave, ImageMagick with processing svg files

Issue with Carrierwave, ImageMagick (or MiniMagick) with processing svg files

Problem:

When uploading svg file with Carrierwave you may get an error:

Failed to manipulate with MiniMagick, maybe it is not an image? 
Original Error: `identify /tmp/mini_magick20190222-32759-1g7lnmy.svg` failed with error:

@binaryhq
binaryhq / imagick-svg2png.txt
Last active July 8, 2021 09:57 — forked from alinmigea/imagick-svg2png.txt
PHP: Use Imagick to convert SVG chart to PNG
Commands for installing the server library:
sudo apt-get install php7.0-imagick
sudo apt-get update
sudo service apache2 restart
Errors:
Caught exception: no decode delegate for this image format `' @ error/blob.c/BlobToImage/
use the following, because it might be that you don't have the MIME tyep SVG installed:
@binaryhq
binaryhq / index.php
Created February 2, 2019 14:16 — forked from ajitbohra/index.php
mpdf: HTML/CSS to PDF & send pdf via email
<?php
/*
mPDF: Generate PDF from HTML/CSS (Complete Code)
*/
require_once( 'mpdf/mpdf.php'); // Include mdpf
$stylesheet = file_get_contents('assets/css/pdf.css'); // Get css content
$html = '<div id="pdf-content">
Your PDF Content goes here (Text/HTML)
</div>';
@binaryhq
binaryhq / full-ffmpeg.sh
Created February 3, 2016 06:31
Install full ffmpeg in debian wheezy (with aac(m4a) and x264 support)
# Add multimedia source
echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring # if this aborts, try again
apt-get update
# Go to local source directory
cd /usr/local/src