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 April 19, 2024 13:22
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 / cgo.md
Last active April 18, 2024 06:14
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 / 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
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 / chrome-developer-setting.md
Created August 1, 2014 20:13
chrome developer setting(chrome:flags)
  • ソフトウェア レンダリング リストを上書き
  • タブ/ウィンドウを高速に閉じる機能を有効にする
  • ハイパーリンク監査の無効化
  • 自動入力の予測候補を表示
  • SPDY/4 を有効にする
  • デベロッパー ツールのテストを有効にする
  • スクロール予測を有効にする
  • HTTP 用のシンプル キャシュ。
  • Google クラウド デバイスを有効にする
  • シンプルな全画面表示を有効にする。
@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.

@zchee
zchee / nvimModeStateDiagram.svg
Created May 29, 2021 13:15 — forked from darcyparker/vimModeStateDiagram.svg
Vim Modes Transition Diagram in SVG https://rawgithub.com/darcyparker/1886716/raw/eab57dfe784f016085251771d65a75a471ca22d4/vimModeStateDiagram.svg Note, most of the nodes in this graph have clickable hyperlinks to documentation.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zchee
zchee / SSHwithgit2go.go
Last active March 10, 2023 18:29 — forked from xorpaul/SSHwithgit2go.go
Working example with SSH and libgit2/git2go
package main
import (
git "github.com/libgit2/git2go"
"log"
)
func credentialsCallback(url string, username string, allowedTypes git.CredType) (git.ErrorCode, *git.Cred) {
ret, cred := git.NewCredSshKey("git", "/home/vagrant/.ssh/id_rsa.pub", "/home/vagrant/.ssh/id_rsa", "")
return git.ErrorCode(ret), &cred