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:
# 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 |
export default class Link extends React.Component { | |
parseTo(to) { | |
let parser = document.createElement('a'); | |
parser.href = to; | |
return parser; | |
} |
<?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>'; |
import React from "react"; | |
import { PropTypes } from "prop-types"; | |
import classNames from "classnames"; | |
import withStyles from "@material-ui/core/styles/withStyles"; | |
import TableCell from "@material-ui/core/TableCell"; | |
import TableSortLabel from "@material-ui/core/TableSortLabel"; | |
import { | |
AutoSizer, | |
Column, | |
SortDirection, |
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: |
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:
sudo certbot certonly --manual -d *.domain.com -d domain.com --agree-tos --no-bootstrap --manual-public-ip-logging-ok --preferred-challenges dns-01 --server https://acme-v02.api.letsencrypt.org/directory --config-dir /home/ubuntu/ssl/config-dir --work-dir /home/ubuntu/ssl/work-dir --logs-dir /home/ubuntu/ssl/logs-dir | |
More information: | |
https://websiteforstudents.com/setup-lets-encrypt-wildcard-on-ubuntu-20-04-18-04/ |
localeParseFloat(s, locale) { | |
// Get the thousands and decimal separator characters used in the locale. | |
let [,thousandsSeparator,,,,decimalSeparator] = 1111.1.toLocaleString(locale); | |
// Remove thousand separators, and put a point where the decimal separator occurs | |
s = Array.from(s, c => c === thousandsSeparator ? "" | |
: c === decimalSeparator ? "." : c).join(""); | |
// Now it can be parsed | |
return parseFloat(s); | |
} |
generated via plantuml