Skip to content

Instantly share code, notes, and snippets.

@jrudolph
jrudolph / .gitignore
Created November 15, 2012 09:31
json-lenses example
/.idea/
/project/boot/
/project/plugins/project
target/
lib_managed/
src_managed/
test-output/
*.iml
@msulliva
msulliva / cq54-aem56-upgrade.md
Last active December 18, 2015 02:19
Old Dominion University recently did a 5.4 to 5.6 upgrade (this was our first upgrade) and there was some interest here, and we figured we would share our lessons learned and checklist with the group.

Overview

We upgraded directly from 5.4 to 5.6 with an in place upgrade using the "-unpack" method. We did the Author on a Saturday, and the Publishers on the Sunday, mostly because we ran into the Publisher permissions problem on Saturday night, and stayed on 5.4 publishers while trying to resolve.

Overview of changes that caused us some pain

New Publisher Permissions

Anonymous User Permissions on Publishers are more restrictive, pretty much just has access to /content and /etc on the publishers in 5.6. So any assets that may have been used from /apps even if not through the public interface should probably move under etc. We had XSL transformations that the component couldn't read the .xsl file under /apps. I think this also is the root cause of the ResourceResolver issues.

@superseb
superseb / README.md
Last active April 17, 2022 09:01
Deploy kubernetes-dashboard on Rancher 2.x cluster exposed using NodePort

Deploy kubernetes-dashboard on Rancher 2.x cluster exposed using NodePort

This has been updated to install Dashboard v2.0.0, see below for pre v2.0.0 instructions

Requirements

Step 1: Generate kubeconfig from the UI

Generate the kubeconfig file for your cluster using the Kubeconfig File button in the Cluster view of your cluster.

@Faheetah
Faheetah / Dockerfile
Last active October 19, 2022 15:22
Docker patterns/anti-patterns
### Generic Dockerfile demonstrating good practices
### Imports
# Bad-ish, we do not need Ubuntu for this, nor do we want latest if we are using in a build system, predictable is better
FROM ubuntu:latest
# Better, using a small image since our app has no dependency on Ubuntu
FROM alpine:3.3
@agemooij
agemooij / customformat.scala
Last active November 28, 2022 13:50
More advanced example of a custom spray-json format
implicit object ProductItemFormat extends RootJsonFormat[ProductItem] {
// some fields are optional so we produce a list of options and
// then flatten it to only write the fields that were Some(..)
def write(item: ProductItem) = JsObject(
List(
Some("product_number" -> item.productNumber.toJson),
item.ean.map(ean ⇒ "ean" -> ean.toJson),
Some("title" -> item.title.toJson),
item.description.map(description ⇒ "description" -> description.toJson),
Some("price" -> item.price.toJson),
@vrischmann
vrischmann / .credentials
Last active January 20, 2023 11:57
Running SBT with a Nexus proxy with authentication
realm=Sonatype Nexus Repository Manager
host=nexus.company.com
user=admin
password=admin123
@mdemblani
mdemblani / Mysql Character Set conversion - Latin1 to UTF-8(utf8mb4).md
Last active June 20, 2023 08:03
Mysql Character Set conversion - Latin1 to UTF-8(utf8mb4)
  1. Make sure mysql-client is installed. If not, then :
    sudo apt install mysql-client
	or
    sudo apt-get install mysql-client
  1. Open php.ini

; PHP's default character set is set to UTF-8.

@thomasdarimont
thomasdarimont / KeycloakClientAuthExample.java
Last active January 14, 2024 10:30
Retrieve and verify AccessToken with Keycloak Client.
package de.tdlabs.keycloak.client;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.keycloak.OAuth2Constants;
import org.keycloak.RSATokenVerifier;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
import org.keycloak.common.VerificationException;
import org.keycloak.jose.jws.JWSHeader;
import org.keycloak.representations.AccessToken;
@thomasdarimont
thomasdarimont / KeycloakAdminClientExample.java
Created June 7, 2017 19:56
Simple example for creating a User with Keycloaks Admin Client - with credentials, custom roles, and user attributes
package de.tdlabs.keycloak.client;
import java.util.Arrays;
import java.util.Collections;
import javax.ws.rs.core.Response;
import org.keycloak.OAuth2Constants;
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.KeycloakBuilder;
@LeCoupa
LeCoupa / redis_cheatsheet.bash
Last active March 18, 2024 09:08
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.