Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
BASE_PATH='/data/htdocs/net'
RRD_PATH='/data/htdocs/net/rrd'
FLOW_LOG="/data/htdocs/net/script/switch-ip.log"
community="secret"
function checkip {
dot=`echo $1 | awk -F '.' '{print NF-1}'`
if [ $dot -ne 3 ]; then
@oiooj
oiooj / rsaencryption.go
Created January 26, 2019 05:31 — forked from hansstimer/rsaencryption.go
Go: rsa public key encryption
package main
import (
"bytes"
"crypto/rand"
"crypto/rsa"
"crypto/sha1"
"fmt"
)
package main
import (
"bytes"
"fmt"
"math"
"strings"
"time"
"github.com/coreos/etcd/raft"
### goproxy.io Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by goproxy.io SE or its affiliates (“goproxy.io”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to goproxy.io in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact opensource@goproxy.io.com.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to goproxy.io a non-
@oiooj
oiooj / LodaStack_CLA
Last active April 10, 2018 02:46 — forked from CLAassistant/SAP_CLA
SAP Individual Contributor License Agreement
###LodaStack Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by LodaStack SE or its affiliates (“LodaStack”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to LodaStack in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact opensource@LodaStack.com.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to LodaStack a non-exclusi
@oiooj
oiooj / demo.go
Last active December 26, 2017 10:21
package main
import (
"bytes"
"encoding/binary"
//"encoding/hex"
"fmt"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
"github.com/google/gopacket/pcap"
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC7Feo7b9xueyjkjAG2kfF0m+d3104O/Y+/oLpkcoJhjGrKGLrd+yiLjrOrzno1AUDoXP+ycM3EezesarA0PuRTOauIW9sn25PxBEBNm6ZsZG/cANv30CoBS/XNk0QAmHP1Zqi0sA+Ic37ABOPm28fat1UWIhfMMLXVwPCCuaB9JQ== Sosara@MBA
@oiooj
oiooj / jd-devops.md
Created June 6, 2017 01:56 — forked from laiwei/jd-devops.md
滴滴运维研发JD

职位描述:

  1. 负责滴滴线上业务的日常运维、优化、容量规划等工作,保障线上业务安全、稳定、高效地运行。
  2. 负责公司运维基础设施开发和运行维护,包括监控系统,运维平台,自动化部署系统,弹性云平台等。
  3. 研究和探索运维新技术和方向,持续提高运维效率,降低运营成本,保障业务稳定。。

职位要求:

  1. 计算机相关专业
  2. 熟悉操作系统原理、计算机网络等,基础知识扎实
  3. 熟悉Linux系统操作原理,了解Linux的安全机制,在Linux平台有深度使用、开发经验
package main
import (
"bufio"
"fmt"
"log"
"net"
"os"
"strings"
"sync"
@oiooj
oiooj / ipcalc.go
Created January 23, 2016 12:55 — forked from kotakanbe/ipcalc.go
get all IP address from CIDR in golang
package main
import (
"net"
"os/exec"
"github.com/k0kubun/pp"
)
func Hosts(cidr string) ([]string, error) {