Skip to content

Instantly share code, notes, and snippets.

View kazuki-ma's full-sized avatar
😀
Please feel free to contact.

Kazuki MATSUDA / 松田一樹 kazuki-ma

😀
Please feel free to contact.
View GitHub Profile

TEST

@kazuki-ma
kazuki-ma / idea.vmoptions
Created September 7, 2020 01:14
G1GC Idea VMOptions
-Xms128m
-Xmx8192m
-XX:+UseG1GC
-XX:MaxGCPauseMillis=100
-XX:ReservedCodeCacheSize=280m
-XX:+UseCompressedOops
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-XX:CICompilerCount=2
-Dsun.io.useCanonPrefixCache=false
var (
modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
procCreateServiceW = modkernel32.NewProc("GetDiskFreeSpaceW")
)
func getClusterSizeOfCurrentDirectory() (int64, error) {
var lpSectorsPerCluster, lpBytesPerSector, lpNumberOfFreeClusters, lpTotalNumberOfClusters int64
- if sysStat, ok := originalStat.Sys().(*syscall.Stat_t); ok {
- // In case of
- //
- // * inode is preserved after cloned. (Not available in MacOS)
- // * we can recover ctime & atime..
- //
- // Git can skip update index step after finished de-dup because file stat is same with index information.
- err := os.Chtimes(dstFile,
- time.Unix(sysStat.Ctimespec.Sec, sysStat.Ctimespec.Nsec),
- time.Unix(sysStat.Atimespec.Sec, sysStat.Atimespec.Nsec))
// +build darwin
package tools
import (
"fmt"
"io"
"os"
"strconv"
"strings"
# see http://editorconfig.org/ for docs on this file
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf ; help with sharing files across os's (i.e. network share or through local vm)
charset = utf-8
trim_trailing_whitespace = true
@kazuki-ma
kazuki-ma / file0.txt
Last active December 12, 2018 13:47
Git LFS で次のエラーメッセージが出たときの一発対処法:Encountered 3 file(s) that should have been pointers, but weren't: ref: https://qiita.com/kazuki-ma/items/782cd1cd7eca2fe988b7
Encountered 1 file(s) that should have been pointers, but weren't:
Assets/xxx.png
@kazuki-ma
kazuki-ma / file0.groovy
Last active August 17, 2018 01:44
Java でロガーを SLF4J に統一する冴えたやり方 ref: https://qiita.com/kazuki-ma/items/13c426e4dccf5cc4d843
configurations.all {
exclude
}
@kazuki-ma
kazuki-ma / SafariResponsiveDesignMode.java
Last active December 23, 2015 13:05
Safari Responsive Design Mode
import java.awt.AWTException;
import java.awt.Robot;
import java.awt.event.KeyEvent;
import java.io.IOException;
import lombok.Cleanup;
import org.openqa.selenium.safari.SafariDriver;
public class SafariCustomDriverProvider {
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/")
public class Test extends HttpServlet {