Skip to content

Instantly share code, notes, and snippets.

View ismaelhamed's full-sized avatar
🚀
lezduit

Ismael Hamed ismaelhamed

🚀
lezduit
  • Schneider Electric
  • Spain
  • 02:17 (UTC +02:00)
View GitHub Profile
@infogulch
infogulch / README.md
Last active September 16, 2023 13:47 — forked from alimbada/Export-Chocolatey.ps1
Export installed Chocolatey packages as packages.config - thanks to Matty666

Put update.ps1, install.ps1, record.ps1, and packages.config inside a git repository to enable tracking which versions you have installed at any one time. This means you can sync between systems and backup via any git host.

Update procedure is:

git pull
./update.ps1
git commit -m "Updated $env:computername"

git push

Recommendations:

@patriknw
patriknw / AtLeastOnceExample.scala
Created September 11, 2019 06:52
AtLeastOnceDelivery in Akka Typed
package docs.akka.persistence.typed
import scala.concurrent.duration.FiniteDuration
import akka.actor.typed.ActorRef
import akka.actor.typed.Behavior
import akka.actor.typed.scaladsl.Behaviors
import akka.actor.typed.scaladsl.LoggerOps
import akka.persistence.typed.PersistenceId
import akka.persistence.typed.RecoveryCompleted
@jmcd
jmcd / TestOutputHelperTextWriterAdapter.cs
Last active December 8, 2022 09:04
Capture `Console.Out` in an XUnit `ITestOutputHelper`
public class TestOutputHelperTextWriterAdapter : TextWriter
{
private readonly ITestOutputHelper output;
private string currentLine = "";
public TestOutputHelperTextWriterAdapter(ITestOutputHelper output)
{
this.output = output;
}
@axw
axw / docker-compose.yml
Last active November 2, 2022 20:59
Docker Compose with Elastic Stack and APM Server 6.5.0
version: "2.1"
services:
apm-server:
image: docker.elastic.co/apm/apm-server:${STACK_VERSION:-6.5.0}
ports:
- "127.0.0.1:${APM_SERVER_PORT:-8200}:8200"
- "127.0.0.1:${APM_SERVER_MONITOR_PORT:-6060}:6060"
command: >
apm-server -e
-E apm-server.rum.enabled=true
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Diagnostics;
using System.IO.Pipelines;
using System.Net.Sockets;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using System;
using System.Threading.Channels;
using System.Threading.Tasks;
namespace ChannelsAreCool
{
//Disclaimer : I didn't actually run this code so it might not quite work.
//Feel free to complain or ask questions and i'll fix it.
public static class Example
{
@navicore
navicore / akka_cockroach.sql
Last active July 27, 2018 17:36
akka cockroachdb sql init
CREATE database akka;
DROP TABLE IF EXISTS akka.journal;
CREATE TABLE IF NOT EXISTS akka.journal (
ordering BIGSERIAL,
persistence_id VARCHAR(255) NOT NULL,
sequence_number BIGINT NOT NULL,
deleted BOOLEAN DEFAULT FALSE,
tags VARCHAR(255) DEFAULT NULL,
@johanandren
johanandren / RateLimit.scala
Created July 14, 2017 10:05
Sample for a custom rate limiting directive for Akka HTTP
/**
* Copyright (C) 2009-2017 Lightbend Inc. <http://www.lightbend.com>
*/
package http
import java.util.concurrent.atomic.AtomicInteger
import akka.actor.{Actor, ActorRef, ActorSystem, Props}
import akka.http.scaladsl.Http
import akka.http.scaladsl.model.{HttpResponse, StatusCodes, Uri}
@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active September 28, 2023 14:54
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution