cd ${GIT_REOP}/.git/hooks
cp pre-commit.sample pre-commit
function checkForBinaries() {
binaryFilesCount=0
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
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 |
"---- 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) |
%option noyywrap | |
%x C_COMMENT | |
%% | |
"/*" { BEGIN(C_COMMENT); } | |
<C_COMMENT>"*/" { BEGIN(INITIAL); } | |
<C_COMMENT>. { } | |
<C_COMMENT>\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