Skip to content

Instantly share code, notes, and snippets.

Avatar

Leo Gallucci elgalu

View GitHub Profile
View _AWS_SSM_SSH_Tunnel.md

EC2 Instance Connect meets AWS Session Manager via SSH

Both things have been introduced recently, and let you access even private ec2 instances

  1. Without VPN
  2. No open SSH port
  3. Authentication / Authorization is fully delegated to IAM
# Assumes valid AWS Credentials in ENV
@elgalu
elgalu / debug.sh
Created Aug 18, 2021 — forked from snstanton/debug.sh
Remote debugging k8s with pycharm
View debug.sh
job_name=debug-`date +%Y%m%d%H%M%S`
kubectl create job ${job_name} --from cj/myveeva-v118273-app-maint
kubectl label pod -l job-name=${job_name} run=debug
kubectl wait --for condition=Ready pod -l job-name=${job_name}
pod_name=`kubectl get pods -l job-name=${job_name} -o jsonpath='{.items[0].metadata.name}'`
echo "installing tools"
kubectl exec ${pod_name} -- sh -c "apk -q update; apk -q add bash curl jq openssh rsync vim unzip postgresql-client; pip install -q ipython"
@elgalu
elgalu / Dockerfile
Last active Jun 27, 2018
Troubleshooting UnsatisfiableError on mro and
View Dockerfile
# Ubuntu 18:04
FROM registry.opensource.zalan.do/stups/ubuntu:latest
#==============================
# Locale and encoding settings
#==============================
# Note: LANGUAGE="${LANG_WHICH}_${LANG_WHERE}.${ENCODING}"
ENV LANG_WHICH="en" \
LANG_WHERE="US" \
LOCALE_TAG="en_US" \
@elgalu
elgalu / process3dGraph.py
Last active Feb 22, 2021 — forked from jerilkuriakose/process3dGraph.py
This is a script which draws the amount of CPU used and memory usage of a process to a 3D graph. Python 3
View process3dGraph.py
#coding:utf-8
import psutil
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
TIME_NUM = 90
FRAMES = 360
@elgalu
elgalu / ...README.md
Created Jul 21, 2017 — forked from schlomo/...README.md
Demo for UI testing with selenium based on Zalenium, see http://blog.schlomo.schapiro.org/2017/07/web-ui-testing-made-easy-with-zalenium.html for details
View ...README.md
View fullAcceptanceTest.sh
$ ./gradlew fullAcceptanceTest
:fullAcceptanceTest
:nakadi:clean
:nakadi:compileJava
Note: /home/user/forks/nakadi/src/main/java/org/zalando/nakadi/config/JsonConfig.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:nakadi:compileGroovy UP-TO-DATE
:nakadi:processResources
View OK-video-rec-stdout.sh
docker run --rm -ti --name zalenium -p 4444:4444 -p 5555:5555 -v $(which docker):/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/videos:/home/seluser/videos --privileged dosel/zalenium start --sauceLabsEnabled false
Docker binary already present, will use that one.
Docker version 1.12.3, build 6b644ec
Starting Nginx reverse proxy...
Starting Selenium Hub...
.14:01:53.275 INFO - Launching Selenium Grid hub
..14:01:53.753 INFO - binding de.zalando.tip.zalenium.servlet.live to /grid/admin/live/*
log4j:WARN No appenders could be found for logger (org.seleniumhq.jetty9.util.log).
log4j:WARN Please initialize the log4j system properly.
View DOSEL_CLA.txt
###Docker-selenium Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by elgalu/docker-selenium, elgalu/dosel, Dosel or its affiliates (“Dosel”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Dosel or docker-selenium in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact elgalu3@gmail.com.
You agree that the following terms apply to all of your past, present and future Contributions.
**Copyright License.** You hereby grant, and agree to grant, to Dosel or docker-selenium a non-exclusive, perpetual, irrevocable, worldwide, fully-paid, royalty-free, transfera
View Dockerfile
# For https://github.com/elgalu/docker-selenium/issues/113
FROM elgalu/selenium
USER root
ENV DEBIAN_FRONTEND=noninteractive \
DEBCONF_NONINTERACTIVE_SEEN=true
###############
# Install git #
View api-with-json-examples.yml
# https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#exampleObject
responses:
"200":
description: |-
200 300 response
examples:
application/json: |-
{
"versions": [
{