Skip to content

Instantly share code, notes, and snippets.

@pabl0rg
pabl0rg / Generate Squash Classes.groovy
Last active Dec 27, 2018
Generate Squash classes from existing DB table
View Generate Squash Classes.groovy
import com.intellij.database.model.DasTable
import com.intellij.database.model.ObjectKind
import com.intellij.database.util.Case
import com.intellij.database.util.DasUtil
/*
* Available context bindings:
* SELECTION Iterable<DasObject>
* PROJECT project
* FILES files helper
View Script to install Kobalt in current folder
type jq >/dev/null 2>&1 || { echo >&2 "I require jq but it's not installed. Aborting."; exit 1; }
LATEST_KOBALT_URL=`curl -s https://api.github.com/repos/cbeust/kobalt/releases/latest | jq -r ".assets[0] | .browser_download_url" `
LATEST_KOBALT_ZIP=`echo "$LATEST_KOBALT_URL" | rev | cut -d / -f 1 | rev`
LATEST_KOBALT=`echo "$LATEST_KOBALT_ZIP" | sed 's/.zip//'`
if [ ! -d ~/.kobalt/wrapper/dist/$LATEST_KOBALT ]; then
mkdir -p ~/.kobalt/wrapper/dist/
cd ~/.kobalt/wrapper/dist/
curl -LO $LATEST_KOBALT_URL
@pabl0rg
pabl0rg / How to start a Kobalt project from CLI.md
Last active Sep 4, 2016
The official Kobalt website http://beust.com/kobalt/documentation/index.html can be a bit overwhelming. Here's a bare-bones guide.
View How to start a Kobalt project from CLI.md

If you want to run your tests and builds from the command line, this is currently the most straight-forward (only?) way to install Kobalt.

  1. Download kobalt
  • Note: this requires jq to be installed first
LATEST_KOBALT_URL=`curl -s https://api.github.com/repos/cbeust/kobalt/releases/latest | jq -r ".assets[0] | .browser_download_url" `
LATEST_KOBALT_ZIP=`echo "$LATEST_KOBALT_URL" | rev | cut -d / -f 1 | rev`
LATEST_KOBALT=`echo "$LATEST_KOBALT_ZIP" | sed 's/.zip//'`

mkdir -p ~/.kobalt/wrapper/dist/