Skip to content

Instantly share code, notes, and snippets.

VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "PgdataClient"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
' Pgdata client class
import os
import csv
import argparse
class Merger():
def __init__(self, filename='merged.csv'):
self.filename = filename
self.data = []
self.fieldnames = set()
@power-guard
power-guard / compress-pdf-with-gs.md
Created December 25, 2020 04:23 — forked from vibegui/compress-pdf-with-gs.md
Compress PDF files with ghostscript

This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.

ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Other options for PDFSETTINGS:

  • /screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting.
  • /ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting.
  • /printer selects output similar to the Acrobat Distiller "Print Optimized" setting.
  • /prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting.
@power-guard
power-guard / index.js
Last active June 8, 2020 04:36
Sample implementation of NetEco OpenAPI
/**
* This example demonstrates how to retrieve a list of plants
* from an iManager NetEco server. The username and password
* should be generated by the server administrator in the
* User Management menu.
*
* @author Dan Liberatori <dan.liberatori@power-guard.jp>
*/
const https = require('https');