| marp | theme |
|---|---|
true |
default |
Powered by kroki.io
| <!-- | |
| Usage: | |
| ```md | |
| --- | |
| layout: two-cols-header | |
| --- | |
| This shows up across both | |
| ::left:: | |
| # Left | |
| This shows on the left |
| marp | theme |
|---|---|
true |
default |
Powered by kroki.io
| import { useCallback, useEffect, useState } from 'react'; | |
| import { useSetRecoilState } from 'recoil'; | |
| import { useKeycloak } from '@react-keycloak/web'; | |
| import { commonNotification } from './common'; | |
| /** | |
| * Returns the auth info and some auth strategies. | |
| * | |
| */ |
| export const ws = webSocket<WebsocketMessage>(`wss://${location.hostname}:${location.protocol === 'https:' ? 443 : 80}/ws/`); | |
| export const wsObserver = ws | |
| .pipe( | |
| retryWhen(errors => | |
| errors.pipe( | |
| delay(1000) | |
| ) | |
| ) | |
| ); |
| $ ls /opt/sonatype/sonatype-work/nexus3/db/ | |
| OSystem accesslog analytics audit component config model.properties security | |
| $ docker-compose exec nexus java -jar ./lib/support/nexus-orient-console.jar | |
| CONNECT PLOCAL:/opt/sonatype/sonatype-work/nexus3/db/component admin admin | |
| REBUILD INDEX * | |
| REPAIR DATABASE --fix-graph | |
| REPAIR DATABASE --fix-links | |
| REPAIR DATABASE --fix-ridbags |
| #### first class expresssion | |
| variable "ami" {} | |
| resource "aws_instance" "example" { | |
| ami = var.ami | |
| } | |
| #### list & map | |
| resource "aws_instance" "example" { | |
| vpc_security_group_ids = var.security_group_id != "" ? [var.security_group_id] : [] | |
| } |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
| import jenkins.model.* | |
| import hudson.security.* | |
| import com.cloudbees.plugins.credentials.* | |
| import hudson.plugins.active_directory.* | |
| def instance = Jenkins.getInstance() | |
| def hudsonRealm = new ActiveDirectorySecurityRealm("domain", "site", "bindName", "bindPassword", "server", GroupLookupStrategy.CHAIN) | |
| //def hudsonRealm = new HudsonPrivateSecurityRealm(false) | |
| instance.setSecurityRealm(hudsonRealm) |
| import jenkins.model.* | |
| import com.cloudbees.plugins.credentials.* | |
| import com.cloudbees.plugins.credentials.common.* | |
| import com.cloudbees.plugins.credentials.domains.* | |
| import com.cloudbees.plugins.credentials.impl.* | |
| import com.cloudbees.jenkins.plugins.sshcredentials.impl.* | |
| import org.jenkinsci.plugins.plaincredentials.* | |
| import org.jenkinsci.plugins.plaincredentials.impl.* | |
| import hudson.util.Secret | |
| import hudson.plugins.sshslaves.* |
| #!/bin/bash | |
| echo "This is a idle script (infinite loop) to keep container running." | |
| echo "Please replace this script." | |
| cleanup () | |
| { | |
| kill -s SIGTERM $! | |
| exit 0 | |
| } |