Skip to content

Instantly share code, notes, and snippets.

View saragluna's full-sized avatar

Xiaolu Dai saragluna

  • Shanghai
View GitHub Profile

Properties enhancement analytics

Currently, the Service Bus Binder does not support to create topic or queue with any topic options. See more from customer-reported issue: Azure/azure-sdk-for-java#35435

Prepare to support the following two high-priority properties:

  • Default message timespan to live value.
  • Maximum size of the topic or queue in megabytes, which is the size of memory allocated for the queue.

Next, we wil compare RabbitMQ binder and Kafka binder, and output the conclusion.

@WillianTomaz
WillianTomaz / wsl2-with-1password-info.md
Last active April 14, 2025 23:08
Instructions for using 1Password SSH Agent with WSL2 (on Windows 11)

LinkedIn

Saturday, April 22, 2023

How to Use 1Password SSH Agent with WSL2 (on Windows 11)

  • Note:

    • Always look for the official documentation, this tutorial may not suit you as there are new updates to the installation process.
    • References are at the end of the document.
  • Was used:

@QNimbus
QNimbus / README.md
Last active April 22, 2025 22:47
SSH Agent forwarding WSL2

SSH Agent forwarding in WSL2

Download npiperelay

To communicate between WSL and the 1Password SSH agent, we'd need to use npiperelay. This tool allows WSL to communicate with Windows' named pipes.

To install it, we need to open the GitHub repository and download the latest release. At the time of writing this post the latest release is v0.1.0 from July 2, 2020.

Unzip it and paste the npiperelay.exe file in any folder that's configured in your system's PATH. For example %USERPROFILE%/.wsl/mpiperelay.exe and then add %USERPROFILE%/.wsl to your PATH.

@lmolkova
lmolkova / metrics_azure_sdk.md
Last active February 22, 2024 02:57
Metrics in Azure SDK for Java

Metrics in Azure SDK for Java

The immediate goal is to report metrics from Azure messaging SDKs (EventHubs and ServiceBus) to help customers detect and investigate configuration issues, performance bottlenecks, application and SDK bugs.

It can be broken down into smaller goals:

  • define metrics essential for messaging scenarios
  • define Metrics API in azure-core
  • metrics plugin implementations
@calexandre
calexandre / merge-zsh-history.sh
Last active April 2, 2025 15:40
Merge two zsh history files
#!/bin/bash
# Inspired on https://david-kerwick.github.io/2017-01-04-combining-zsh-history-files/
set -e
history1=$1
history2=$2
merged=$3
echo "Merging history files: $history1 + $history2"
test ! -f $history1 && echo "File $history1 not found" && exit 1

前端响应式布局解决方案

移动端页面布局的问题,在当今前端是比较常见的话题,因为不同终端设备的分辨率,dpr等不同,导致前端无法用单一的px值来将页面的元素固定,需要通过技术手段在不同的环境下进行适配,来保证页面最佳的可读性,这里将会总结一些常见的方案。

百分比布局

这是最早的布局解决方案,解决成本低,高效。

将页面元素的宽度以百分比来进行设置,高度不变。

Next.js ------ 从零快速搭建Next框架教程

写在前面

Next.js是提供基于React的SSR框架。解决SPA的一些缺点。下文会对SPA应用进行一些简单的介绍,并且会通过拆分本Demo的实现,让大家学会如何从零搭建Next框架。

SPA的本质以及优缺点

现今前端开发技术,spa(single page application)单页应用的普及度越来越高,react以及vue这类的前端UI框架为spa提供的很好的实现。单页应用的本质其实就是浏览器首先加载必须的HTML、CSS和Javascript,所有的操作都在这张页面上完成,都由JavaScript来控制。

优点:

  • 分离前后端关注点,前端负责view,后端负责model,各司其职;

引言

前端是一个快速发展的领域,而在前端的技术栈当中,前端请求又是最见的一个领域,通过请求接口数据,才能将一个静态的页面动态化。本文将以前端发展的时间轴来逐一分析前端请求的技术演变及其优劣,针对这一课题,作者查阅了相关资料加以自己的理解,如有错误,烦请指出。

XMLHttpRequest

XMLHttpRequest是最早出现的与服务器交换数据的方案,有了XMLHttpRequest,开发者终于可以在不重新加载页面的情况下更新网页,可以在页面加载后请求接受以及发送数据。而所有浏览器均可以获取XMLHttpRequest对象:

var xhr = new XMLHttpRequest(); //获取xhr对象

但是XMLHttpRequest是个比较粗燥的底层对象,各个浏览器对其的创建方法也不同,以下是兼容方法:

@SheldonWangRJT
SheldonWangRJT / Convert .mov or .MP4 to .gif.md
Last active April 23, 2025 02:00
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@BretFisher
BretFisher / docker-for-mac.md
Last active March 31, 2025 10:12
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1