Skip to content

Instantly share code, notes, and snippets.

View egoes's full-sized avatar

Enrique Pardo egoes

View GitHub Profile

Keybase proof

I hereby claim:

  • I am egoes on github.
  • I am enriquep (https://keybase.io/enriquep) on keybase.
  • I have a public key ASA1wN2OSMXc0nt-_XQNvsT9R7BPnkIy43ei0Kf2Up4nuAo

To claim this, I am signing this object:

@egoes
egoes / ShowGeoBounds.jsx
Created January 18, 2009 16:18
Adobe InDesign javascript that shows a simple dialog with the geometric bounds of the selected object.
//DESCRIPTION:Show geometricBounds (y1, x1, y2, x2) /* ShowGeoBounds.jsx Adobe InDesign javascript by Enrique Pardo - www.enriquepardo.com Get it at: http://gist.github.com/48689 Shows a dialog box with the geometric bounds of the selected object y1 x1 y2 x2 [0] [1] [2] [3] y x x+w y+h */ var gb = app.activeDocument.selection[0].geometricBounds; var xcoord = gb[1] var ycoord = gb[0] var width = gb[3] - gb[1] var height = gb[2] - gb[0] alert ( 'x=' + xcoord + ' y=' + ycoord + '\rw=' + width + ' h=' + height + '\r(' + gb + ')' , 1)
@egoes
egoes / peecho_custom_spb.md
Last active August 29, 2015 14:01
Peecho Simple Print Button (SPB) advanced configuration as partly documented on http://www.peecho.com/simple-print-button

Peecho Simple Print Button (SPB) customization

Data elements that change Print Button behaviour

data-country="Switzerland"
the current country can be set, the matching currency will automatically be selected if data-currency is not set.

data-currency="CHF"
an indicator for the preferred currency.

@egoes
egoes / makejpg
Last active August 29, 2015 14:00
Make jpegs out of a pdf file. Put in .bash_profile or .bashrc and call 'makejpg 72 file.pdf'
# Ghostscript function to make jpegs out of a pdf file
domakejpg() {
gs -dSAFER \
-sDEVICE=jpeg \
-r$1 \
-dJPEGQ=90 \
-dTextAlphaBits=4 \
-dGraphicsAlphaBits=4 \
-dUseTrimBox \
-o page%02d.jpg $2