Skip to content

Instantly share code, notes, and snippets.

@siggibjarna
siggibjarna / TSV-Icelandic-Groovy.tsv.groovy
Created Oct 21, 2016
DataGrip extractor to copy tab separated query results to paste into Excel with comma decimal separator
View TSV-Icelandic-Groovy.tsv.groovy
SEPARATOR = "\t"
QUOTE = "\""
NEWLINE = System.getProperty("line.separator")
def record(values, valueToString) {
values.eachWithIndex { value, idx ->
def str = valueToString(value)
def q = str.contains(SEPARATOR) || str.contains(QUOTE) || str.contains(NEWLINE)
def n = str.isNumber()
OUT.append(q ? QUOTE : "")
View powerssh.ps1
# Script Name: powerssh
# Version: 1.0.0 (24. June, 2014)
# Author: Sveinn Steinarsson
# Description: Use Powershell to connect to a remote server via SSH and run a shell script/command
# Prerequisite:
# plink.exe in script path (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
# Examples:
# With key file (*.ppk) and script file