Skip to content

Instantly share code, notes, and snippets.

View cfsilence's full-sized avatar

Todd Sharp cfsilence

View GitHub Profile
def result = "oci os multipart list -bn doggos --all".execute()
def multipartObject = new groovy.json.JsonSlurper().parseText(result.text)
multipartObject.data.each {
println "oci os multipart abort --bucket-name ${it.bucket} --object-name ${it.object} --upload-id ${it['upload-id']} --force".execute().text
}
const ListObjectsRequest = require('oci-node-sdk/src/codes/recursive/model/objectstorage/ListObjectsRequest.js');
const listObjectsRequest = new ListObjectsRequest(namespace, bucketName);
client.listObjects(listObjectsRequest)
.then((result) => console.log(result))
.catch((err) => console.log(err))
Integer p = System.getenv("PORT")?.toInteger() ?: 9000
port(p)
{
"runtime": {
"majorVersion": "8"
},
"type": "web",
"command": "java -jar app.jar",
"startupTime": "120",
"notes": "notes related to release",
"mode": "rolling",
"home": "/",
task packageOracle(type: Zip) {
dependsOn jar
from configurations.runtime.allArtifacts.files
from 'manifest.json'
}
sourceSets.main.resources.srcDirs = [ "src/main/groovy" ]
sourceSets.main.resources.includes = [ "**/conf/**" ]
jar {
dependsOn configurations.runtime
manifest {
attributes "Main-Class": "$mainClassName"
}
from {
configurations.compile.collect { it.isDirectory() ? it : zipTree(it) }
}
archiveName "app.jar"
notifyMessage(message: Message):void {
// don't notify the user of messages they sent
// and only show a notification if the application
// isn't visible (IE: it is minimized)
if( message.author === this.currentUsername || !this.showDesktopNotification ) {
return;
}
const notification = {
title: `TWACK Message from ${message.author}`,
body: message.body
// page visibility API
// see: https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API
window.addEventListener('webkitvisibilitychange', (e) => {
this.showDesktopNotification = document['webkitHidden'];
});
notifyMessage(message: Message):void {
// don't notify the user of messages they sent
// and only show a notification if the application
// isn't visible (IE: it is minimized)
if( message.author === this.currentUsername || !this.showDesktopNotification ) {
return;
}
const notification = {
title: `TWACK Message from ${message.author}`,
body: message.body