Skip to content

Instantly share code, notes, and snippets.

View zchee's full-sized avatar
😩
want to Go knowledge...

Koichi Shiraishi zchee

😩
want to Go knowledge...
View GitHub Profile
@zchee
zchee / actionlist.vim
Last active July 26, 2024 02:55
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@zchee
zchee / compile_commands.json
Last active July 25, 2024 00:27
Sample compile_commands.json for neovim
[
{
"directory": "/Users/zchee/src/github.com/neovim/neovim/build",
"command": "/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -DHAVE_CONFIG_H -DINCLUDE_GENERATED_DECLARATIONS -Iconfig -I../src -isystem ../.deps/usr/include -isystem ../.deps/usr/include/luajit-2.0 -isystem /usr/local/opt/gettext/include -Isrc/nvim/auto -Iinclude -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -Ofast -flto -march=native -DDISABLE_LOG -fPIC -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DMAKE_LIB -o src/nvim/CMakeFiles/libnvim.dir/__/__/config/auto/pathdef.c.o -c /Users/zchee/src/github.com/neovim/neovim/build/config/auto/pathdef.c",
"file": "/Users/zchee/src/github.com/neovim/neovim/build/config/auto/pathdef.c"
},
{
"directory": "/Users/zchee/src/github.com/neovim/neovim/build",
"command": "/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolc
@zchee
zchee / cgo.md
Last active July 14, 2024 14:58
cgo convert list

See also, http://libraryofalexandria.io/cgo/

Using Go cgo

cgo has a lot of trap.
but Not "C" pkg also directory in $GOROOT/src. IDE's(vim) Goto command not works.

So, Here collect materials.

@zchee
zchee / EndpointSecurityDemo.m
Created April 3, 2020 16:32 — forked from Omar-Ikram/EndpointSecurityDemo.m
A demo of using Apple's new EndpointSecurity framework - tested on macOS Catalina 10.15 (19A583)
//
// main.m
// EndpointSecurityDemo
//
// Created by Omar Ikram on 17/06/2019 - Catalina 10.15 Beta 1 (19A471t)
// Updated by Omar Ikram on 15/08/2019 - Catalina 10.15 Beta 5 (19A526h)
// Updated by Omar Ikram on 01/12/2019 - Catalina 10.15 (19A583)
//
#import <Foundation/Foundation.h>
@zchee
zchee / chrome-developer-setting.md
Created August 1, 2014 20:13
chrome developer setting(chrome:flags)
  • ソフトウェア レンダリング リストを上書き
  • タブ/ウィンドウを高速に閉じる機能を有効にする
  • ハイパーリンク監査の無効化
  • 自動入力の予測候補を表示
  • SPDY/4 を有効にする
  • デベロッパー ツールのテストを有効にする
  • スクロール予測を有効にする
  • HTTP 用のシンプル キャシュ。
  • Google クラウド デバイスを有効にする
  • シンプルな全画面表示を有効にする。
Title : Revisiting Mac OS X Kernel Rootkits
Author : fG!
Date : April 18, 2014
|=----------------------------------------------------------------------------=|
|=----------------=[ Revisiting Mac OS X Kernel Rootkits ]=-------------------=|
|=----------------------------------------------------------------------------=|
|=------------------------=[ fG! <phrack@put.as> ]=---------------------------=|
|=----------------------------------------------------------------------------=|
@zchee
zchee / hosts
Created February 23, 2017 13:56 — forked from consti/hosts
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
@zchee
zchee / intel-parallel-sutdia-xe-2016-professional-edition-for-fortran-cxx.md
Created September 30, 2015 20:02
Intel® Parallel Studio XE 2016 Professional Edition for Fortran and C++ Linux
@zchee
zchee / defer.sh
Created April 26, 2020 22:03 — forked from phemmer/defer.sh
bash defer function - just like go's defer()
function _run_deferred() {
local _depth="$BASHPID.${#FUNCNAME[@]}"
[[ "$_depth" != "$_deferred_depth" ]] && return
local opt=$-
set +e
for (( i=${#_deferred[@]} - 1; i >= 0; i-- )); do
eval "${_deferred[i]}"
done
[[ "$opt" == *e* ]] && set -e
}

https://groups.google.com/forum/#!topic/comp.sys.mac.system/jIWY8VRl3cw

Recommended "vm_compressor=2" or "vm_compressor=4".

Compressor mode 4 (VM compressed + swap) and all the steps between 1st-4th descripted before, is equal than compressor mode 2 (VM compressed/encrypted without swap).

In compressor mode 1, if you disable swap, system is always 100% memory pressure, and if memory is full at some point, the system will freeze.

So i recommended mode 2 or 4 with steps to disable swap applied.