Skip to content

Instantly share code, notes, and snippets.

@rwunsch
rwunsch / 0_reuse_code.js
Created June 7, 2016 18:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@rwunsch
rwunsch / bash_profile-dconnect.sh
Last active February 15, 2021 00:53
#BASH - Script / shell-function "dconnect" for bash_profile to connect to a running docker container on the shell (SSH like).This script creates a list of running docker containers to choose from.Original: https://raw.githubusercontent.com/Data-Monkey/unRAID/master/tools/DockerSelector.sh
dconnect() {
###############################################
# This script will let you chose which docker container to exec into
#
# Original idea and concept by hernandito
# DockerList by bonienl
# URL: https://raw.githubusercontent.com/Data-Monkey/unRAID/master/tools/DockerSelector.sh
################################################
clear
@rwunsch
rwunsch / MAVEN_AEM_dependencies.md
Last active October 4, 2016 16:09
Adobe CQ / AEM - Maven Configurations - Uber.jar (obfuscated / unobfuscated) - AEM-API - content-package-maven-plugin

Maven AEM dependencies

@rwunsch
rwunsch / AEM_Indexes_get_all_indexes
Last active September 13, 2016 08:02
Get all Indexes from a AEM machine
http://host:port/oak:index.tidy.-1.json
@rwunsch
rwunsch / Windows - Change Java version (JDK) per command line via batch file
Last active August 10, 2023 17:16
Windows - Change Java version (JDK) per command line via batch file
Windows - Change Java version per batch command
Put these batch files in one of the PATH folders.
I usually put the %userprofile% in the path and place the BAT files there.
To change the JAVA version, type e.g."jdk 1.6".
@rwunsch
rwunsch / AEM_Get_Complete_Configuration_Status_of_Instance
Created September 2, 2016 18:53
AEM - Get complete configuration-status of an AEM instance
HTTP:
-----
http://localhost:4502/system/console/status-slinglogs/configuration-status.zip
Curl:
-----
curl -u admin:admin -O -J http://localhost:4504/system/console/status-slinglogs/configuration-status.zip
GCOPT="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:${CURR_DIR}/logs/gc_`date +%Y%m%d-%H%M%S`.log"
java $CQ_JVM_OPTS $GCOPT -jar $CURR_DIR/$CQ_JARFILE $START_OPTS &
echo $! > $CURR_DIR/conf/cq.pid
@rwunsch
rwunsch / unzip-r.bat
Last active September 3, 2016 23:03
Recursive Unzip files in Windows
FOR /F "usebackq" %%a in (`DIR /s /b *.zip`) do 7z.exe e %%a
@rwunsch
rwunsch / httpstatus
Created September 5, 2016 13:07 — forked from rsvp/httpstatus
httpstatus : bash script to get HTTP response code with optional status message (includes verbose definitions in comment)
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-08-25
#
# _______________| httpstatus : get HTTP status code
#
# Usage: httpstatus URL [timeout] [--code or --status] [see 4.]
# ^message with code (default)
# ^code (numeric only)
# ^in secs (default: 3)
# ^URL without "http://" prefix works fine.
#!/bin/bash
# first grab all dependencies
mvn dependency:resolve >/dev/null
# then list them with -o to keep noise low,
# remove extra information and duplicates
mvn -o dependency:list \
| grep ":.*:.*:.*" \
| cut -d] -f2- \
| sed 's/:[a-z]*$//g' \