注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。
启动新会话:
tmux [new -s 会话名 -n 窗口名]
恢复会话:
Here is the gist for showing how to send string from c to go without a copy, for sending an float32 array from c to go without copy, please see here
Below is the documentation for converting between a c string and a go string:
// From https://golang.org/cmd/cgo/
// A few special functions convert between Go and C types by making copies of the data.
// Go string to C string
// The C string is allocated in the C heap using malloc.
// It is the caller's responsibility to arrange for it to be
// freed, such as by calling C.free (be sure to include stdlib.h
%option noyywrap | |
%x C_COMMENT | |
%% | |
"/*" { BEGIN(C_COMMENT); } | |
<C_COMMENT>"*/" { BEGIN(INITIAL); } | |
<C_COMMENT>. { } | |
<C_COMMENT>\n { } |
"---- vim-plug setup ---- | |
let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim') | |
if has('win32')&&!has('win64') | |
let curl_exists=expand('C:\Windows\Sysnative\curl.exe') | |
else | |
let curl_exists=expand('curl') | |
endif | |
if !filereadable(vimplug_exists) | |
if !executable(curl_exists) |
use std::str; | |
fn main() { | |
// -- FROM: vec of chars -- | |
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}']; | |
// to String | |
let string1: String = src1.iter().collect::<String>(); | |
// to str | |
let str1: &str = &src1.iter().collect::<String>(); | |
// to vec of byte |
Using Laravel Valet for localhost development, So it installs
dnsmasq
with it. dnsmasq runs on port53
, The default DNS port. So we setup dnscrypt-proxy on port5300
with the default config files in this gist.
brew install dnscrypt-proxy