Skip to content

Instantly share code, notes, and snippets.

Luca Cerone lucacerone

Block or report user

Report or block lucacerone

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lucacerone
lucacerone / impala.R
Created Nov 4, 2016 — forked from daroczig/impala.R
Connect and query Imapala via SSH and Impala-shell from R
View impala.R
#' Connect and query Imapala via SSH and Impala-shell
#' @param query SQL query to run
#' @param host server hostname or IP
#' @param log enable or disable logging of debug/trace messages
#' @return data.table object
#' @export
query_impala <- function(query, host = 'localhost', log = require(futile.logger)) {
## measure time of query
timer <- proc.time()
@lucacerone
lucacerone / pdfcompress
Created Feb 26, 2014
Simple bash script to compress pdf files using Ghostscript
View pdfcompress
#!/usr/bin/env bash
# Compress a pdf using gs.
# Requires in input the compression type, the name of the file to compress and the name of the output file (in this order).
# Example:
# pdfcompress screen MyHighResDocument.pdf MyLowResDocument.pdf
#
# Possible values for compression types are:
# 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.
You can’t perform that action at this time.