Skip to content

Instantly share code, notes, and snippets.

View osscontributor's full-sized avatar

OSS Contributor osscontributor

View GitHub Profile
name: Publish To GCR
on:
push:
tags:
- 'v*'
env:
GCLOUD_REGION: ${{ secrets.GCLOUD_REGION }}
PROJECT_ORGANIZATION: ${{ secrets.PROJECT_ORGANIZATION }}
DOCKER_IMAGE: ${{ secrets.DOCKER_REGISTRY_URL }}
jobs:
// This is a bad idea
File f = File.createTempFile("temp", Long.toString(System.nanoTime()));
System.setErr(new PrintStream(new FileOutputStream(f)) {
@Override
public void println(String x) {
throw new RuntimeException(x);
}
});
System.err.println("overflow!");
~ $ git clone git@github.com:jeffbrown/stevemaystermkdir.git
Cloning into 'stevemaystermkdir'...
remote: Enumerating objects: 23, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 23 (delta 0), reused 23 (delta 0), pack-reused 0
Receiving objects: 100% (23/23), 60.03 KiB | 543.00 KiB/s, done.
~ $
~ $
~ $ cd stevemaystermkdir
~ $ pwd
/Users/jeffscottbrown
~ $
~ $ ls stevemayster
~ $
~ $ cat stevewantstocreatedirectory.groovy
def nametest = 'try'
def patchPath = '/Users/jeffscottbrown/stevemayster'
def fileName = "${patchPath}/${nametest}"
class Person {
String name
Person parent
static belongsTo = [ supervisor: Person ]
static mappedBy = [ supervisor: "none", parent: "none" ]
static constraints = { supervisor nullable: true }
}
demonstration $ git clone git@github.com:solaechea/SampleMicronautClientApp.git
Cloning into 'SampleMicronautClientApp'...
remote: Enumerating objects: 109, done.
remote: Counting objects: 100% (109/109), done.
remote: Compressing objects: 100% (79/79), done.
remote: Total 109 (delta 13), reused 109 (delta 13), pack-reused 0
Receiving objects: 100% (109/109), 800.58 KiB | 3.79 MiB/s, done.
Resolving deltas: 100% (13/13), done.
demonstration $
demonstration $ cd SampleMicronautClientApp
def resp = execution.getVariable("jsonResponse")
if (!resp.success) {
logWarn("$resp.statusCode and error $resp.errorString")
} else {
def list = resp.content.clusterIds
logWarn("$list")
}
} finally {
execution.setVariable("clusterNames", clusterNames )
~ $ git clone git@github.com:jeffbrown/bassouat.git
Cloning into 'bassouat'...
remote: Enumerating objects: 107, done.
remote: Counting objects: 100% (107/107), done.
remote: Compressing objects: 100% (87/87), done.
remote: Total 107 (delta 10), reused 107 (delta 10), pack-reused 0
Receiving objects: 100% (107/107), 627.87 KiB | 2.24 MiB/s, done.
Resolving deltas: 100% (10/10), done.
~ $
~ $ cd bassouat
~ $ cat demo.groovy
def arr = [[places:[[city:'New York', states:'Texas'],
[city:'Chicago', states:'Alaska']],
foods: [[drinks:'Soda', snack:'Fries'],
[drinks:'Milk', snack: 'Cereals']],foods: [[drinks:'Soda', snack:'Fries'], [drinks:'Milk', snack: 'Cereals']],
places:[[city:'New York', states:'Montana'], [city:'Austin', states:'Alaska']]]]
println arr[0]['places']
println arr[0].places
~ $ groovy -v
Groovy Version: 3.0.8 JVM: 11.0.2 Vendor: Oracle Corporation OS: Mac OS X
~ $ groovy -e "println new Date().format('yyyy')"
2022