Posts
Install sqlserver in wsl2 and ubuntu 22.04
I searched web, first several links in SERP are not the offical one from microsoft. I tried them and failed to install mssql due to errors Error: 'deb [arch=amd64 https://download.docker.com/linux/ubuntu \ xenial \ stable' invalid] or Can’t install MS SQL Server on Ubuntu 21.10. At last I follow the instruction from microsoft. I successfully installed mssql server in my wsl+ubuntu22.04 environment.
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.
Posts
Should I use .netrc for git authentication
I used .netrc in several projects and I wrote something about that. I thought it is a convenient way for git until recently.
Recently I have a new laptop and want to setup my git credentials. This time, I noticed .netrc might not be secure as other applications that use cURL to make requests to servers defined in your .netrc file will also now be authenticated using these credentials.
Posts
Extract multiple fields at different levels of nesting json using chatgpt and jmespath
How do you extract multiple fields at different levels of nesting json resources? jsonpath, jq, jmespath or chatgpt?
In FHIR, bundle resource in json format usually have multiple level of details nested in json. It’s quite different from other use cases.
My first thought is using jsonpath as it is quite similar to FHIRPath. There are several limitations of jsonpath which make it infeasible.
It doesn’t support to the use case, even though JsonPath supports deep scan and Bracket-notated child or children.
Posts
Custom verbs or operations in REST API
Standard REST API has limited verbs if using http verbs. However in reality and many business contexts, they are not enough. In the past, many options are proposed. Today I found another option in FHIR. It might be helful to put them here for comparison.
Control data in request In stackoverflow What to do when you need more verbs in REST, cheeso gave the answer below. It is like the way json-rpc, not well-specified version.
Posts
Extract multiple field and values from a json file fetched once in powerquery
I learnt to extract npm package inform from https://registry.npmjs.org/ on 2023-08-31. Today I have more packages. The original query need to be optimized for better performance.
In the old post, one can quickly spot that the package information is fetched twice. It is the place to optimize today. I will put selected fields into a column, and extract values from the column later. This way, It can spend less time.
Posts
mount configmap as volume with ini files
Today I spent about 1 hours in the task Deploy Lamp Stack on Kubernetes Cluster - Task. This task deepen my understanding of ini file handling and volume mounting with subpath. I think there are 2 tricky parts make the task interesting.
First, the similarity between --from-literal=variables_order=EGPCS and variables_order = "EGPCS" in php.ini make one try to create a configmap at first. However it is not the case. the actual volumemount will mount each key as a file
Posts
My journey to CKA and CKS
Today I got certified as Certified Kubernetes Security Specialist (CKS). It marks a milestone in my mastery of kubernetes after a long journey. It is a good time to reflect on lessons what I learnt.
My experiences with kubernetes from 2018. I have a habit of comparing other optiosn before making my decisions. Before 2018, I used vagrant and other configuration management tools (puppet, chef, ansible) to setup my lab environments.
Posts
Issues and corresponding solutions of dotnet razor
Seperate view dll issues Put views (cshtml) into the main web project
'RazorTargetAssemblyInfo.cs' could not be found GenerateAssemblyVersionAttribute is set to true : af file MyProject.RazorTargetAssemblyInfo.cs is generated
<Project Sdk="Microsoft.NET.Sdk.Razor"> <PropertyGroup> <TargetFramework>netcoreapp3.1</TargetFramework> <GenerateAssemblyVersionAttribute>true</GenerateAssemblyVersionAttribute> </PropertyGroup> https://github.com/dotnet/aspnetcore/issues/37795#issue-1034241118
The namespace 'Razor' already contains a definition for 'Template' https://stackoverflow.com/a/58140724/1101691
Duplicate 'Microsoft.AspNetCore.Razor.Hosting.RazorLanguageVersionAttribute' attribute How to decompile/extract(cshtml--(razor view)) from dll https://stackoverflow.com/a/69951824/1101691
Posts
Restore a project collections of azure devops to another instance
I spent almost a whole afternoon today to restore a project collections . It doesn’t go well. Azure devops server might supports SQL Server express version. and I choose the wrong way to do that. After several trial, I figure out the way to restore a project collections of azure devops to another instance. The steps is as following.
install sql server (not sure if sql server express is compatible)
Posts
decompling dotnet assemblies
I used dotpeek for a while to decompile dotnet assembly. Only yesterday I finally found a way to export project from dotnet assembly. The picture below is the menu to do that in dotpeek. However the version I used doesn’t perfectly decompile lambda expression. The decompiled code of lambda expressions are very hard to understand.
Ilspy is one of decompiler that can decompile lambda in a understandble way.