Skip to content

Instantly share code, notes, and snippets.

View carlosedp's full-sized avatar

Carlos Eduardo carlosedp

View GitHub Profile
@carlosedp
carlosedp / docker-compose.yml
Created January 19, 2018 14:35
docker-compose.yml - Traefik and Portainer
version: '2'
networks:
monitoring:
services:
traefik:
image: traefik:v1.5.0-rc5
restart: always
@carlosedp
carlosedp / jmh-result.json
Last active April 1, 2024 22:39
Benchmark results for https://github.com/carlosedp/zio-channel/ at 2024-04-01T22:39:00
[
{
"jmhVersion" : "1.37",
"benchmark" : "zio.channel.benchmarks.Benchmarks.sendMessagesZioChannel",
"mode" : "avgt",
"threads" : 1,
"forks" : 1,
"jvm" : "/usr/lib/jvm/temurin-17-jdk-amd64/bin/java",
"jvmArgs" : [
],
@carlosedp
carlosedp / httpserver.scala
Last active March 20, 2024 00:57
Scala ZIO-HTTP with logback and GraalVM native-image binary support
// Run with scala-cli httpserver.scala
// Save logback.xml file into ./resources dir
// Before generating native image binary, run first as above and make a real access to the URL
// so the native-image-agent can generate the metadata in ./resources dir.
// Then generate native image binary with: scala-cli package --native-image httpserver.scala
//> using scala "3.3.0"
//> using lib "dev.zio::zio:2.0.15"
//> using lib "dev.zio::zio-http:3.0.0-RC2"
//> using lib "dev.zio::zio-logging-slf4j2::2.1.13"
//> using lib "ch.qos.logback:logback-classic:1.4.8"
@carlosedp
carlosedp / nginx-auth.yaml
Last active February 22, 2024 19:45
NGINX Keycloak Authentication
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: nginx
@carlosedp
carlosedp / readme.md
Created December 22, 2021 20:54
Generate certificates

Generate certificates and keys with SAN

# Generate rootCA key and certificate
openssl genrsa -out rootCA.key 4096
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.crt

# Generate certificate key
openssl genrsa -out mydomain.com.key 2048
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index c512a9e..e9d6f58 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -221,7 +221,7 @@ superdom.c
#endif /* LCD_DEPTH > 1 */
-
+test_disk.c
@carlosedp
carlosedp / openshift_network.md
Last active November 27, 2023 09:47
Openshift Network Sizing

Openshift Network Sizing

Parameters on inventory [OSE3:vars]

osm_host_subnet_length

This variable specifies the size of the per host subnet allocated for pod IPs by OpenShift Container Platform SDN. Defaults to 9 which means that a subnet of size /23 is allocated to each host; for example, given the default 10.128.0.0/14 cluster network, this will allocate 10.128.0.0/23, 10.128.2.0/23, 10.128.4.0/23, and so on. This cannot be re-configured after deployment.

osm_cluster_network_cidr

@carlosedp
carlosedp / TupleAssign.scala
Last active November 10, 2023 16:42
Direct tuple assignment in for comprehension
// Run with scala-cli TupleAssing.scala
//
// //> using scala "3.3.1"
//> using scala "3.4.0-RC1-bin-20231109-c7b3d7b-NIGHTLY"
//> using lib "dev.zio::zio:2.0.19"
// (required before Scala 3.4)
// //> using options -source:future
import zio.*
@carlosedp
carlosedp / mnist.py
Created June 12, 2020 20:09
Python TensorFlow 2 MNIST Sample
from __future__ import absolute_import, division, print_function
import tensorflow as tf
from tensorflow.keras import Model, layers
import numpy as np
tf.compat.v1.enable_eager_execution()
# MNIST dataset parameters.
num_classes = 10 # total classes (0-9 digits).
@carlosedp
carlosedp / gtkwave.tcl
Last active June 15, 2023 13:33
GTKWave TCL script to colorize and group signals for Chisel projects
#
# GTKWave Grouping and colorizing script
#
# Load the trace with `gtkwave -S gtkwave.tcl yourtrace.vcd`
#
# Customize the inserted traces in the TOPlevel section below
# and at the bottom in the add_signals function calls
#
# Customize this section as needed