Skip to content

Instantly share code, notes, and snippets.

@sbilly
sbilly / logs.md
Created December 2, 2020 00:28
nnet basic example.

run seed in a vm with public internet ip address.

# go run seed.go
2020/12/01 16:25:11 [119 42 39 175 216 103 81 128 232 108 136 240 198 14 94 8 233 51 80 60 186 249 108 87 28 181 134 16 75 78 216 212]
2020/12/01 16:25:11 nnet: {tcp [tcp kcp] SOME_REMOTE_ADDR 23333 32 8 smux 8 32 23333 23333 1 [BROADCAST_PUSH] 5m0s 10s 2333 2333 [BROADCAST_PUSH] 5m0s 10s 20971520 5s 1s 5s 20s 5s 23333 8 3 2 2s}

run peer in my laptop.

@sbilly
sbilly / zerotier - client isolation.md
Created December 22, 2018 09:56 — forked from laduke/zerotier - client isolation.md
ZeroTier Rules Engine - Hub and Spoke - Client Isolation

Common ZeroTier Rules Engine question

  • Non-servers can talk to servers, but not each other
  • Kind of like Client Isolation on some WiFi controllers

Rules

# Allow only IPv4, IPv4 ARP, and IPv6 Ethernet frames. Typical default
drop
not ethertype ipv4
and not ethertype arp
@sbilly
sbilly / zerotier - client isolation.md
Created December 22, 2018 09:56 — forked from laduke/zerotier - client isolation.md
ZeroTier Rules Engine - Hub and Spoke - Client Isolation

Common ZeroTier Rules Engine question

  • Non-servers can talk to servers, but not each other
  • Kind of like Client Isolation on some WiFi controllers

Rules

# Allow only IPv4, IPv4 ARP, and IPv6 Ethernet frames. Typical default
drop
not ethertype ipv4
and not ethertype arp
@sbilly
sbilly / fofa_rule.sql
Created September 21, 2018 16:06 — forked from Tr3jer/fofa_rule.sql
fofa_rule.sql
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50542
Source Host : localhost
Source Database : rule
Target Server Type : MySQL
@sbilly
sbilly / recover_source_code.md
Created April 9, 2017 05:30 — forked from simonw/recover_source_code.md
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@sbilly
sbilly / gist:2849989
Created June 1, 2012 07:39 — forked from zythum/gist:2848881
google收录的敏感词