Skip to content

Instantly share code, notes, and snippets.

View LuoZijun's full-sized avatar
🎯
Focusing

寧靜 LuoZijun

🎯
Focusing
View GitHub Profile
@LuoZijun
LuoZijun / test.rst
Last active May 3, 2018 02:39
reST table

Table of contents

Today's date is .

This document was generated on at .

#!/usr/bin/env python3
#coding: utf8
import math
import random
def isPrime(n):
for i in range(2, int( n**0.5) + 1):
if n % i == 0:
@LuoZijun
LuoZijun / dhcp_leases.rs
Last active December 2, 2017 04:06
Get DHCP leases info
#![cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))]
use std::fs::File;
use std::io::Read;
#[derive(Debug)]
pub struct DhcpLeases {
pub ip_addr: Option<::std::net::IpAddr>,
pub router_ip_addr: Option<::std::net::IpAddr>,
#!/usr/bin/env python3
#coding: utf8
import re
import time
# Javascript Re
# [\\.\u3002\uFF0E\uFF61]|%2e|%2E
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>
package main
import "os";
import "syscall";
import "fmt";
import "os/signal";
var GLOBAL_SIGNAL := make(chan bool, 1);
func is_alive () bool {

小桔灯笔记

Date

10/13 2017

TAP/TUN 介绍

@LuoZijun
LuoZijun / README.rst
Last active March 23, 2022 07:20
IB 交易人词汇表 (Interactive Brokers Traders' Glossary)
@LuoZijun
LuoZijun / test.js
Created August 22, 2017 06:57
模拟微信发送消息后判断当前网络速率,并根据网络速率做相应的交互。
// 模拟微信发送消息后判断当前网络速率,并根据网络速率做相应的交互。
function Duration (){
this.btime = new Date();
}
Duration.prototype.elapsed = function (){
let now = new Date();
return now.getTime() - this.btime.getTime();
}
@LuoZijun
LuoZijun / README.rst
Last active July 21, 2017 08:43
PyGumbo

Run

git clone https://github.com/Sigil-Ebook/Sigil.git
wget "https://gist.github.com/LuoZijun/69a55c292d5d4f884c612a5345e54de4/raw/16c443bff775b447492ad5964f609df00a47f860/test.py"