Open in Visual Studio Code in Finder with Automator

Here’s how to add “Open in Visual Studio Code” in Finder in MacOS: Open Automator. Choose Quick Action. Change Workflow receives current with files and folders, and in with Finder.app and Path Finder.app (if you have) Add an action Run Shell Script, enter open -n -b “com.microsoft.VSCode” –args “$*” And it’s done.  

Category: mac

Display Azure Container Registry as Table

The docker image display of Azure Container Registry is horrible: From the Azure UI, you don’t know the relation of each tag and time. So I wrote a shell script to display it in a table using Azure Cli: The result will be like this: Much nicer. 🙂

Migrate from Vue Cli 2 to 3

Vue Cli 3 is officially released so it’s a great time to upgrade because it brings a bunch of new features like plugin system, hiding the complexity of webpack and the very nice UI for the Cli. It make the Vue development experience even more fun. I spent around 30 mins to migrate an complete… Read More »

Category: vue

Entity Framework Generic Repository

Introduction A generic Entity Framework repository pattern implementation. Code https://github.com/jinweijie/EF.GenericRepository Usage Unzip Database\Database.7z, attach to LocalDB, or restore to your favoriate Sql Server instance and change the connection string in App.Config. Open solution and run the application. Base Repository The base repository exists in Common\AbstractRepository.cs, it handles the basic CRUD operations, for example, methods like… Read More »

Dapper Custom Pagination Sample

Introduction Sample for custom pagination using Dapper. Supporting sorting + criteria + pagination. Source Code https://github.com/jinweijie/Dapper.PagingSample Usage Unzip Database\Database.7z, attach to LocalDB, or restore to your favoriate Sql Server instance and change the connection string in App.Config. Open solution and run the application. Caller sample: Tuple<IEnumerable<Log>, int> Find(LogSearchCriteria criteria , int pageIndex , int pageSize… Read More »

How to print Chinese characters in ZPL

1. You need to have Chinese font on the printer, use Zebra font downloader application to install. 2. The is a sample code to print Chinese characters: ^XA ^CI28 ^A@N,50,50,E:SIMSUN.FNT ^FO50,110^FDChinese 中文字符^FS ^XZ Another format can be: ^XA ^CI28 ^CWA,E:SIMSUN.FNT ^FO240,30^AAN,36,36^FDChinese 中文字符^FS ^XZ Use CW command to change font, so that you need only to… Read More »

Category: zpl

Hide Back Button of Modern UI for WPF

I searched the web seems no answer for this topic, so i create a style to hide the button: <Style TargetType=”{x:Type mui:ModernButton}”> <Style.Triggers> <Trigger Property=”Command” Value=”NavigationCommands.BrowseBack”> <Setter Property=”Visibility” Value=”Collapsed” /> </Trigger> </Style.Triggers> </Style> Hope it helps.

Category: wpf