We will be using following information throughout this article:
index_name : customersindex_type : personalcustomer will have name,age,gender,email,phone,address,city,state as fields in schema for now
| # A basic re-implementation of gron in JQ | |
| # Operates in a streaming manner, without having to read the entire input first or hold it in memory | |
| # Try: cat big.json | while read; do printf '%s\n' "$REPLY"; sleep 0.1; done | jqgron | |
| # Most operations are slower than gron, but `jqgron -u -j` is actually faster! | |
| def topath: | |
| map(if (tostring|test("\\A[[:alpha:]$_][[:alnum:]$_]*\\z")|not) | |
| then "[\(tojson)]" else ".\(.)" end) | join(""); | |
| def tojqpath: | |
| topath | if .[0:1] == "[" then "." + . else . end; |
| create table source (A Int64, B String) Engine=MergeTree order by A; | |
| insert into source values(1,'1'); | |
| -- | |
| -- stop ingestion | |
| -- | |
| alter table source freeze; | |
| create materialized view newMV Engine=SummingMergeTree order by A |
| #!/bin/bash | |
| SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
| TARGET_HOST="${TARGET_HOST:?"You must define TARGET_HOST"}" | |
| PASSWORD_FILE="${PASSWORD_FILE:?"You must define PASSWORD_FILE"}" | |
| EAP_PROXY_IMAGE="${EAP_PROXY_IMAGE:-"pbrah/eap_proxy-udmpro:v1.1"}" | |
| HC_CONTAINER_NAME="eap_proxy-healthcheck" | |
| UDM_CONTAINER_NAME="eap_proxy-udmpro" |
| use rusoto_core::ByteStream; | |
| use rusoto_s3::{S3Client, S3}; | |
| use futures::{future, stream, Stream, StreamExt, TryStreamExt}; | |
| pub async fn upload_stream( | |
| client: S3Client, | |
| bucket: String, | |
| key: String, | |
| data_stream: impl Stream<Item = String>, |
| class Stack | |
| def self.start_link(state) | |
| GenServer.start_link(new(state)) | |
| end | |
| def self.push(ractor, value) | |
| GenServer.cast(ractor, [:push, value]) | |
| end | |
| def self.pop(ractor) |
| use futures::StreamExt; | |
| use std::error::Error; | |
| use tokio; | |
| use tokio::macros::support::Pin; | |
| use tokio::prelude::*; | |
| use tokio::time::{Duration, Instant}; | |
| pub fn main() -> Result<(), Box<dyn std::error::Error>> { | |
| let mut multi_threaded_runtime = tokio::runtime::Builder::new() | |
| .threaded_scheduler() |
VMWare Fusion 13 is now released. Read Vagrant and VMWare Fusion 13 Player on Apple M1 Pro for the latest.
This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated
| # Example to use Docker instead of containerd & nerdctl | |
| # $ limactl start ./lima_docker_rootless.yaml | |
| # $ limactl shell lima_docker_rootless docker run -it -v $HOME:$HOME --rm alpine | |
| # To run `docker` on the host (assumes docker-cli is installed): | |
| # $ export DOCKER_HOST=unix://$HOME/docker.sock | |
| # $ docker ... | |
| # This example requires Lima v0.7.3 or later | |
| # CPUs: if you see performance issues, try limiting cpus to 1. |
| David Fowler 🇧🇧🇺🇸💉💉💉 on Twitter: "If you are queuing background jobs/work items today in your .NET applications, how are you doing it and what are you using it for? #dotnet #aspnetcore" / Twitter | |
| https://twitter.com/davidfowl/status/1442566223099666436 | |
| Background tasks with hosted services in ASP.NET Core | Microsoft Docs | |
| https://docs.microsoft.com/en-us/aspnet/core/fundamentals/host/hosted-services?view=aspnetcore-6.0&tabs=visual-studio | |
| Messaging that just works — RabbitMQ | |
| https://www.rabbitmq.com/ | |
| .NET/C# Client API Guide — RabbitMQ |