Skip to content

Instantly share code, notes, and snippets.

View ZenLiuCN's full-sized avatar
🎯
Focusing

Zen Liu ZenLiuCN

🎯
Focusing
  • China Sichuan
View GitHub Profile
Dim iFile(1 To 100000) As String
Dim count As Integer
Sub xls2xlsx()
iPath = "D:\Dev\project\jvm\pharmacy\Ã×ÄÚÍøÅÅÃû\"
On Error Resume Next
count = 0
zdir iPath
For i = 1 To count
If iFile(i) Like "*.xls" And iFile(i) <> ThisWorkbook.FullName Then
MyFile = iFile(i)

Licenses

#!/bin/sh

go install github.com/google/go-licenses@latest &&\
cd src &&\
go-licenses save "github.com/ZenLiuCN/loader" --save_path="../LICENSES"
@ZenLiuCN
ZenLiuCN / JdkTips.java
Last active November 3, 2023 05:15
Java tips
interface JdkTips{
static void toClipboard(String val){
//java.awt.Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new java.awt.datatransfer.StringSelection($SELECTION$), null);
java.awt.Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new java.awt.datatransfer.StringSelection(val), null);
}
}
@ZenLiuCN
ZenLiuCN / attach_console.go
Created February 5, 2023 09:53
unit for attch to console with windows gui application
//go:build windows
/*
* written by Zen.Liu, License as MIT
*/
package main
import (
"os"
s "syscall"
)
@ZenLiuCN
ZenLiuCN / macro_log_unit.h
Last active February 3, 2023 08:22
C Units
//
// Created by ZenLiu, license MIT
//
#ifndef _MACRO_LOG_UNIT_H
#define _MACRO_LOG_UNIT_H
#ifdef MACRO_LOG_INTO_FILE
/**
* user's response to open and close file if defined _LOG_FILE_.
@ZenLiuCN
ZenLiuCN / PetiteVue_Template.html
Last active January 2, 2022 10:06
PetiteVue Modular Template
<html>
<head>
<title>template</title>
<style>
body {
font-family: Helvetica Neue, Arial, sans-serif;
}
</style>
</head>
<body>
@ZenLiuCN
ZenLiuCN / sample.go
Last active November 17, 2021 07:33 — forked from chanwit/win32_jit.go
package main
import (
"syscall"
"unsafe"
)
const (
MemCommit = 0x1000
MemReserve = 0x2000
PageExecuteReadwrite = 0x40

*unix

fetch process memory

ps -ux --sort rss  | awk 'NR>1 {$6=int(100 * $6/1024)/100"MB";$5=int(100 * $5/1024)/100"MB";}{ print;}'|column -t
public interface ClassSerialize{
static String classToString(Class cls) {
return cls.getName()
.replaceFirst("class ", "")
.replaceFirst("interface ", "");
}
@SneakyThrows
static Class stringToClass(String cls) {
if (cls.contains("$")) {
@ZenLiuCN
ZenLiuCN / docker_cheat.md
Last active July 19, 2021 05:40
DOCKER_CHEAT

Docker Cheat Tips

1. run deno inside docker

run deno inside docker

script or command to start :

#!/bin/sh
docker run --rm \
-a STDIN -a STDOUT -a STDERR \