Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

寧靜 LuoZijun

🎯
Focusing
View GitHub Profile
View main.go
package main
import "fmt"
import "math/big"
type BigInt big.Int
func one() *big.Int {
return big.NewInt(1)
}
View Cargo.toml
[package]
name = "bench_neptune"
version = "0.1.0"
authors = ["luozijun <luozijun.assistant@gmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
lazy_static = "1.4"
View run.sh
#!/bin/bash
echo "
rdr pass inet proto tcp from any to any port 6000 -> 127.0.0.1 port 8080
" | sudo pfctl -ef -
@LuoZijun
LuoZijun / test.rst
Last active Jan 18, 2020
测试 RST
View test.rst
View Why I’m speaking out about the porn industry.rst

色情片演员米娅·哈利法在 BBC Hard Talk 节目中接受史蒂文·萨克尔的采访,谈论了她对色情行业的看法

电视节目:BBC Hard Talk
节目主持人:史蒂文·萨克尔 (Stephen Sackur),BBC主持人
节目受访人:米娅·哈利法 (Mia Khalifa),色情片演员
采访视频(英文字幕):Mia Khalifa: Why I’m speaking out about the porn industry
采访视频(中文字幕):米娅·哈利法是著名色情片演员,她看到什么业界问题?
采访时长:00:07:11
发布日期:2019年9月7日发布
View ffi.rs
#![allow(non_camel_case_types, non_snake_case, unused_variables, unused_macros)]
// #[macro_use]
// #[path = "src/macros.rs"]
// mod macros;
macro_rules! FN {
(stdcall $func:ident($($t:ty,)*) -> $ret:ty) => (
pub type $func = Option<unsafe extern "system" fn($($t,)*) -> $ret>;
);
(stdcall $func:ident($($p:ident: $t:ty,)*) -> $ret:ty) => (
View delroute.go
package main
import (
"fmt"
"github.com/vishvananda/netlink"
)
// Note: Add route first.
// $ sudo ip route add 8.8.8.8 dev enp0s3
View wintun.rs
#![allow(non_camel_case_types, unused_variables, non_snake_case)]
pub type c_void = ();
pub type ULONG = u64;
pub type LONG = i64;
pub type HANDLE = *mut c_void;
pub type TUN_RING_PTR = *mut u8;
pub const TUN_RING_DEFAULT_CAPACITY: usize = 8388608; // 2**23 = 8MB
pub const TUN_RING_LEN: usize = std::mem::size_of::<TUN_RING_HEADER>() + TUN_RING_DEFAULT_CAPACITY + 0x10000;
View w.rs
#![allow(non_camel_case_types, non_snake_case)]
pub const ANY_SIZE: usize = 1;
pub type DWORD = u32;
pub type USHORT = u16;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct MIB_IPADDRROW_XP {
View named_pipe.rs
// mio = "0.6"
// mio-named-pipes = "0.1"
extern crate mio;
extern crate mio_named_pipes;
use mio_named_pipes::NamedPipe;
use std::io::{self, Read, Write};
You can’t perform that action at this time.