Skip to content

Instantly share code, notes, and snippets.

View russau's full-sized avatar

Russ Sayers russau

View GitHub Profile
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except
# in compliance with the License. A copy of the License is located at
#
# https://aws.amazon.com/apache-2-0/
#
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
apt update --assume-yes && \
apt install docker.io --assume-yes && \
apt install docker-compose --assume-yes && \
usermod -a -G docker ubuntu
package clients;
import clients.avro.PositionValue;
import io.confluent.kafka.serializers.AbstractKafkaAvroSerDeConfig;
import io.confluent.kafka.serializers.KafkaAvroSerializer;
import io.confluent.kafka.serializers.KafkaAvroSerializerConfig;
import io.confluent.monitoring.clients.interceptor.MonitoringProducerInterceptor;
import java.io.File;
import java.io.IOException;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@russau
russau / words_per_min.ipynb
Last active November 10, 2019 18:07
Notebook words_per_min
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
Before you run this establish an SSH tunnel to the postgres database:
ssh -L 5432:localhost:5432 ubuntu@52.41.18.116
"""
import boto3
import pprint
import sys
import psycopg2
import hashlib
@russau
russau / code-lock.sh
Last active September 18, 2019 17:59
#!/bin/bash -ex
# force all the extensions to update
code --install-extension vscjava.vscode-java-pack --force && \
code --install-extension ms-azuretools.vscode-docker --force && \
code --install-extension ms-python.python --force && \
code --install-extension ms-vscode.csharp --force && \
code --install-extension redhat.java --force && \
code --install-extension VisualStudioExptTeam.vscodeintellicode --force && \
code --install-extension vscjava.vscode-java-debug --force && \
@russau
russau / vm-patch.sh
Last active September 18, 2019 00:08
#!/bin/bash
ver=${ver-0.46.0}
code --install-extension vscjava.vscode-java-pack --force && \
code --uninstall-extension vscjava.vscode-java-dependency && \
code --uninstall-extension vscjava.vscode-java-test && \
code --uninstall-extension vscjava.vscode-java-debug && \
code --uninstall-extension redhat.java
wget https://github.com/redhat-developer/vscode-java/releases/download/v${ver}/redhat.java-${ver}.vsix
code --install-extension redhat.java-${ver}.vsix
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@russau
russau / load_test_rollup.ipynb
Created May 8, 2019 01:22
load_test_rollup
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.