On Mac, Homebrew is the de-facto package manager, and Homebrew Cask is the app manager. I’m going to use Cask to install Java 7 and 8.
Install Homebrew Cask first if you haven’t:
brew update
brew tap caskroom/cask
| #!/bin/sh | |
| JAR_FILE=application.jar | |
| if [ ! -f "$JAR_FILE" ]; then | |
| echo "build.error: application jar is missing!" | |
| exit 1 | |
| fi | |
| jar xf application.jar | |
| REQUIRED_JAVA_MODULES="$(jdeps \ |
| #!/bin/bash | |
| JAVA_OPTS="${JAVA_OPTS:="-Dfile.encoding=UTF-8 -Duser.timezone=UTC -XX:NativeMemoryTracking=summary -XX:+HeapDumpOnOutOfMemoryError"}" | |
| PORT="${PORT:="8080"}" | |
| term_handler() { | |
| if [ $pid -ne 0 ]; then | |
| kill -SIGTERM "$pid" | |
| wait "$pid" | |
| fi |
| # Making here use of a docker multi-stage build | |
| # https://docs.docker.com/build/building/multi-stage/ | |
| # Build-time container | |
| FROM azul/zulu-openjdk-alpine:17.0.7 as builder | |
| ARG JAR_FILE | |
| WORKDIR application | |
| COPY $JAR_FILE application.jar | |
| COPY build_application.sh ./ | |
| RUN sh build_application.sh |
| ssl_certificate /etc/nginx/ssl/sonar.domain.tld/cert.pem; | |
| ssl_certificate_key /etc/nginx/ssl/sonar.domain.tld/privkey.pem; | |
| upstream sonar { | |
| server 127.0.0.1:9000 fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| server_name sonar.domain.tld; |
| $ 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 |
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <style> | |
| @import url(http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300|Josefin+Slab|Arvo|Lato|Vollkorn|Abril+Fatface|Old+Standard+TT|Droid+Sans|Lobster|Inconsolata|Montserrat|Playfair+Display|Karla|Alegreya|Libre+Baskerville|Merriweather|Lora|Archivo+Narrow|Neuton|Signika|Questrial|Fjalla+One|Bitter|Varela+Round); | |
| .background { | |
| fill: #eee; | |
| pointer-events: all; | |
| } |