ps -ux --sort rss | awk 'NR>1 {$6=int(100 * $6/1024)/100"MB";$5=int(100 * $5/1024)/100"MB";}{ print;}'|column -t
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//go:build windows | |
/* | |
* written by Zen.Liu, License as MIT | |
*/ | |
package main | |
import ( | |
"os" | |
s "syscall" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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_. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>template</title> | |
<style> | |
body { | |
font-family: Helvetica Neue, Arial, sans-serif; | |
} | |
</style> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"syscall" | |
"unsafe" | |
) | |
const ( | |
MemCommit = 0x1000 | |
MemReserve = 0x2000 | |
PageExecuteReadwrite = 0x40 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface ClassSerialize{ | |
static String classToString(Class cls) { | |
return cls.getName() | |
.replaceFirst("class ", "") | |
.replaceFirst("interface ", ""); | |
} | |
@SneakyThrows | |
static Class stringToClass(String cls) { | |
if (cls.contains("$")) { |
script or command to start :
#!/bin/sh
docker run --rm \
-a STDIN -a STDOUT -a STDERR \
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tester; | |
import io.protostuff.LinkedBuffer; | |
import io.protostuff.ProtostuffIOUtil; | |
import io.protostuff.Schema; | |
import io.protostuff.runtime.DefaultIdStrategy; | |
import io.protostuff.runtime.IdStrategy; | |
import io.protostuff.runtime.RuntimeSchema; | |
import lombok.SneakyThrows; | |
import lombok.ToString; |