# display available drives
Get-PSDrive
# create local driver directory
mkdir c:\drivers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Occasionally I want to see the application properties that are pulled down from the Spring Cloud Config service that provides | |
# content to our Spring Boot apps. Since I seem to have to re-discover this every time, I figured I'd write it down to help me | |
# remember. | |
# | |
# Additional docs can be found here: https://cloud.spring.io/spring-cloud-config/single/spring-cloud-config.html | |
# To see the output in YML format | |
curl -u {the user name}:{the user password} http://{the domain:port}/{the application name}-{the spring profile name}.yml | |
# For example: |
Here I have 2 methods for running portainer on windows, a quick, preferred method only requiring a fairly recent version of docker, or a more complicated method to try if that does not work.
This setup will let you run Portainer on windows by using the host.docker.internal endpoint (docker.for.win.localhost
is depricated since docker version 3.2.1, but older versions may use this instead).
Please note:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Taken from http://rustyautopsy.github.io/rabbitholes/2014/10/21/vmcreate/ | |
# Original author: Travis Dolan | |
DEFAULT_DISK_SIZE=32 | |
DEFAULT_MEMORY=2048 | |
DEFAULT_SOCKETS=1 | |
DEFAULT_CORES=2 | |
DEFAULT_ISO='ubuntu-14.04-server-amd64.iso' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.avro.Schema; | |
import org.apache.avro.generic.GenericData; | |
import org.apache.avro.generic.GenericRecord; | |
import org.apache.avro.reflect.ReflectData; | |
import java.util.Arrays; | |
public class GenericRecordFixtureFactory { | |
public static GenericRecord createFromEvent(String siteId, String visitorId, String timestampMs) { | |
EventMock eventMock = new EventMock(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM alpine:3.7 | |
RUN echo 'http://dl-4.alpinelinux.org/alpine/edge/community/' >> /etc/apk/repositories | |
ENV PYTHON_VERSION=2.7.14-r2 | |
ENV PY_PIP_VERSION=9.0.1-r1 | |
ENV SUPERVISOR_VERSION=3.3.1 | |
ENV NGINX_VERSION=1.12.2-r3 | |
RUN mkdir /www && mkdir /www/myapp/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
plex: | |
image: linuxserver/plex | |
container_name: plex | |
volumes: | |
- /path/to/plex/config:/config | |
- /path/to/plex/Movies:/data/movies | |
- /path/to/plex/Shows:/data/tvshows | |
- /path/to/plex/transcode:/data/transcode |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Encrypt | |
curl -sbiL -X POST http://localhost:8888/encrypt -d '[the value you want to encrypt]' | |
# Decrypt | |
curl -sbiL -X POST http://localhost:8888/decrypt -d '[the encrypted value, without the "{cipher}" prefix]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.mapping; | |
import io.confluent.common.config.ConfigException; | |
import io.confluent.kafka.schemaregistry.client.CachedSchemaRegistryClient; | |
import io.confluent.kafka.serializers.AbstractKafkaAvroDeserializer; | |
import io.confluent.kafka.serializers.KafkaAvroDeserializerConfig; | |
import org.apache.kafka.common.serialization.Deserializer; | |
import java.util.Collections; | |
import java.util.List; |