Skip to content

Instantly share code, notes, and snippets.

View neur1n's full-sized avatar
🤔
O'RLY

neur1n

🤔
O'RLY
View GitHub Profile
@neur1n
neur1n / readv_loop_example.c
Last active March 8, 2023 09:58
Using readv in a loop
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
#include <sys/uio.h>
#define BUF_SIZE 1024
@neur1n
neur1n / nng.cmake
Last active September 5, 2022 06:53
embed nng from source
OPTION(NNG_TESTS "Build and run tests." OFF)
OPTION(NNG_TOOLS "Build extra tools." OFF)
OPTION(NNG_ELIDE_DEPRECATED "Elide deprecated functionality." OFF)
OPTION(NNG_ENABLE_COVERAGE "Enable coverage reporting." OFF)
OPTION(NNG_ENABLE_NNGCAT "Enable building nngcat utility." OFF)
OPTION(NNG_ENABLE_STATS "Enable statistics." OFF)
# Protocols.
OPTION(NNG_PROTO_REQ0 "Enable REQv0 protocol." ON)
OPTION(NNG_PROTO_REP0 "Enable REPv0 protocol." ON)
/******************************************************************************
Author: Jihang Li (Jihang.Li_AT_outlook.com)
Last update: 2021-06-28 19:09
******************************************************************************/
#ifndef NEU_H
#define NEU_H
#include <stdio.h>
#include <stdlib.h>
#include <condition_variable>
@neur1n
neur1n / cVim
Last active November 27, 2018 08:19
cVim Options
let scrollstep = 100
set smoothscroll
command bd tabnew baidu
command bi tabnew bing
command dg tabnew duckduckgo
command gl tabnew google
let searchalias bd = "baidu"
let searchalias bi = "bing"
let searchalias dg = "duckduckgo"
let searchalias gl = "google"