- You have Ghostscript installed, right? Otherwise
sudo apt-get install ghostscript - This is important and installs the headers (
iapi.hetc) which are required but don't come with the default Ghostscript package:sudo apt-get install libgs-dev - I also needed
sudo apt-get install gs-esp - For me the pre compiled version of ImageMagick never accepted Ghostscript, so let's remove it:
sudo apt-get --purge remove imagemagick - Get the source of ImageMagick, untar it,
cd ImageMagick-xx ./configure --with-gslib=yes[and what else you need]- Confirm in the output near the bottom
gslib yes yesand notgslib yes no makemake install- Run
convert -list configure | grep DELEGATES=>DELEGATES bzlib djvu freetype gs jpeg jng jp2 lcms png tiff x11 xml zlib
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| license: gpl-3.0 | |
| height: 2910 | |
| border: no | |
| redirect: https://observablehq.com/@d3/d3-calendar-view |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.contrib.admin.widgets import FilteredSelectMultiple | |
| from django import forms | |
| def widget(model_reference, field, title, titlew): | |
| class WidgetForm(forms.ModelForm): | |
| vars()[field] = forms.ModelMultipleChoiceField(queryset=model_reference.objects.all(), | |
| label=(title), | |
| widget=FilteredSelectMultiple( | |
| (titlew), | |
| False, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /etc/udev/rules.d/99-usb-serial.rules | |
| # udevadm info --attribute-walk -n /dev/ttyUSB0 |grep serial (can be used to get serial number) | |
| # udevadm control --reload-rules (reload rules) | |
| # udevadm trigger (re-add all devices) | |
| # see https://wiki.archlinux.org/index.php/Bus_pirate | |
| # for some reason, ATTRS{bInterfaceNumber}=="00" is not working, hence the use of ENV{} | |
| # single USB/serial adapters | |
| SUBSYSTEM=="tty", ATTRS{serial}=="A900TUKZ", SYMLINK+="ttyUSB_bub_1" | |
| SUBSYSTEM=="tty", ATTRS{serial}=="A700fdWb", SYMLINK+="ttyUSB_bub_2" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| import json | |
| import sys | |
| from ConfigParser import (ConfigParser, MissingSectionHeaderError, | |
| ParsingError, DEFAULTSECT) | |
| class StrictConfigParser(ConfigParser): | |
| def _read(self, fp, fpname): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SomeFragment extends Fragment { | |
| MapView mapView; | |
| GoogleMap map; | |
| @Override | |
| public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
| View v = inflater.inflate(R.layout.some_layout, container, false); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| String sortedKey(List couple) { | |
| couple.sort(); | |
| return Strings.concatAll(couple); | |
| } | |
| List mapper(Map m) { | |
| var res = []; | |
| for (var person in m.keys) { | |
| var friends = m[person]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pyPdf import PdfFileWriter, PdfFileReader | |
| import StringIO | |
| from reportlab.pdfgen import canvas | |
| from reportlab.lib.pagesizes import letter | |
| packet = StringIO.StringIO() | |
| # create a new PDF with Reportlab | |
| can = canvas.Canvas(packet, pagesize=letter) | |
| can.drawString(100,100, "Hello world") | |
| can.save() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://plainoldstan.blogspot.hk/2010/11/wix-installing-and-uninstalling-windows.html: | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | |
| <Product Id="9c78f041-c29e-4d80-8d23-e4839e74038c" Name="StansApp" | |
| Language="1033" Version="1.0.0.0" | |
| Manufacturer="Standa" UpgradeCode="b1adfc21-927f-470a-ac87-a5019c84a253"> | |
| <Package InstallerVersion="200" Compressed="yes" /> | |
| <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /> | |
| <Directory Id="TARGETDIR" Name="SourceDir"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Yeah, this all got outmoded when serious dependency problems with Tabula were removed. | |
| No need to use this. Get Tabula directly. http://tabula.nerdpower.org/ | |