Skip to content

Instantly share code, notes, and snippets.

@johanvergeer
johanvergeer / ExportTableHeaders.p
Created December 6, 2017 11:01
Progress OpenEdge Export column names
/*------------------------------------------------------------------------
File : Export table headers
Purpose : Gist for exporting table headers in Progress OpenEdge
Description :
Author(s) : Johan Vergeer. With thanks to TheDropper at
https://stackoverflow.com/questions/44204335/how-to-add-column-name-while-export-csv-in-progress-4gl#44205839
Created : 6 december 2017
----------------------------------------------------------------------*/
DEF VAR hTable AS HANDLE NO-UNDO.
#!/usr/bin/env bash
GIST_ID=${1}
# Check if the GIST_ID param has a value
if [ -z "$GIST_ID" ];
then
echo 'GIST_ID is a required parameter';
else
package com.redgyro.education.`oo-classes-functions-inheritance`
fun main(args: Array<String>) {
/**
* Kotlin has 4 access modifiers
* Just like in Java there is "public", "private", "protected"
*
* And there is "internal"
*
* Default access modifier
// A simple Spring Boot Entity written in Kotlin
data class PersonEntity(
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
val id: Long = -1,
val name: String = ""
)
@johanvergeer
johanvergeer / Order.kt
Last active March 30, 2018 19:04
Simple way to encapsulate a collection in a Kotlin Spring Entity
import javax.persistence.*
@Entity
data class OrderEntity(
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
val id: Long? = -1,
var firstName: String,
-- Create a test database
create database hrDB;
use [hrDB];
go
create schema dbo;
go
-- Create a user that can insert values while the schema updates are executed

Replace container while retaining volume

This script is intended to demonstrate how a Docker volume can be # reused by a new container. The image we'll use is SQL Server 2017

The scripts are baed on the official Microsoft documentation

Create a new container and volume

Create a new container from the mssql-server-linux image

@johanvergeer
johanvergeer / create_and_restore_backup.md
Last active October 9, 2020 18:22
Create and replace database backup in Docker

Create and restore a database backing using Docker

This script is intended to demonstrate how a backup can be created and restored using Docker containers. The image we'll use is SQL Server 2017

The scripts are baed on the official Microsoft documentation

Create a new container and volume

Create a new container from the mssql-server-linux image

@johanvergeer
johanvergeer / download-docker-compose.sh
Last active September 28, 2018 08:38
Docker Jenkins
cd /usr/local/bin
wget https://github.com/docker/compose/releases/download/1.13.0/docker-compose-Linux-x86_64
mv docker-compose* docker-compose
chmod +x docker-compose
@johanvergeer
johanvergeer / _macbook-setup.md
Last active October 13, 2018 09:08
My Macbook setup