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
| <!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; | |
| } |
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |
| #!/bin/sh | |
| JAVA_OPTS="-Dfile.encoding=UTF-8 -Duser.timezone=UTC" | |
| PORT="8080" | |
| cd /srv/"$APP" || exit | |
| /opt/java/bin/java $JAVA_OPTS org.springframework.boot.loader.JarLauncher --bind 0.0.0.0:$PORT |
| #!/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 \ |
| # Making here use of a docker multi-stage build | |
| # https://docs.docker.com/develop/develop-images/multistage-build/ | |
| # Build-time container | |
| FROM eclipse-temurin:17.0.3_7-jdk-alpine as builder | |
| ARG JAR_FILE | |
| WORKDIR application | |
| COPY $JAR_FILE application.jar | |
| COPY build_application.sh ./ | |
| RUN sh build_application.sh |
| # 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 | |
| # 2017 - @leonjza | |
| # | |
| # Wordpress 4.7.0/4.7.1 Unauthenticated Content Injection PoC | |
| # Full bug description: https://blog.sucuri.net/2017/02/content-injection-vulnerability-wordpress-rest-api.html | |
| # Usage example: | |
| # | |
| # List available posts: | |
| # | |
| # $ python inject.py http://localhost:8070/ |