Skip to content

Instantly share code, notes, and snippets.

fengxsong fengxsong

Block or report user

Report or block fengxsong

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Dockerfile
FROM maven:3.5.2-jdk-9 AS build
COPY pom.xml /usr/src/app
COPY src /usr/src/app/src
RUN mvn -f /usr/src/app/pom.xml clean package
FROM maven:3.5.2-jdk-9 AS build
COPY pom.xml /usr/src/app/
RUN mvn -f /usr/src/app/pom.xml dependency:copy-dependencies
COPY src /usr/src/app/src
RUN mvn -f /usr/src/app/pom.xml clean package
View temp.log
➜ tree
.
├── Chart.yaml
├── templates
│ ├── _helpers.tpl
│ └── service.yaml
└── values.yaml
1 directory, 4 files
@fengxsong
fengxsong / dingtalk.py
Created Nov 15, 2017
elastalert的dingding告警
View dingtalk.py
#!/usr/bin/env python
# encoding:utf8
"""
https://open-doc.dingtalk.com/docs/doc.htm?spm=a219a.7629140.0.0.karFPe&treeId=257&articleId=105735&docType=1
"""
from __future__ import unicode_literals
import copy
import json
import requests
View pre-receive
#!/bin/env bash
zero_commit="0000000000000000000000000000000000000000"
permit_user="gitlab-ci"
commit_msg_format="ci/`date +%Y%m%d`/*"
excludeExisting="--not --all"
@fengxsong
fengxsong / auto_reg.go
Last active Jul 2, 2017
test github.com/weibocom/nginx-upsync-module
View auto_reg.go
package main
import (
"bytes"
"flag"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
@fengxsong
fengxsong / difference-between-some-operators-golang.md
Last active May 23, 2017
difference-between-some-operators-golang
View difference-between-some-operators-golang.md

[URL][1]

package main

import "fmt"

func main() {
    // Use bitwise OR | to get the bits that are in 1 OR 2
    // 1     = 00000001
    // 2     = 00000010
View OID.md
OID Descr Remarks Method
.1.3.6.1.2.1.1.1.0 系统基本信息 SysDescr GET
.1.3.6.1.2.1.1.3.0 SNMP自启动监控时间 sysUptime GET
.1.3.6.1.2.1.1.4.0 系统联系人 sysContact GET
.1.3.6.1.2.1.1.5.0 机器名 SysName GET
.1.3.6.1.2.1.1.6.0 所在位置 SysLocation GET
.1.3.6.1.2.1.1.7.0 提供服务 SysService GET
.1.3.6.1.2.1.25.4.2.1.2 系统运行进程列表 hrSWRunName WALK
.1.3.6.1.2.1.25.6.3.1.2 系统安装列表 hrSWInstalledName WALK
View rsync.py
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import os
import click
import logging
import re
import subprocess
import time
@fengxsong
fengxsong / check_http.go
Last active Nov 23, 2017
check_http tracing http request. notice! some function comes from davecheney's httpstat
View check_http.go
package main
import (
"bytes"
"context"
"crypto/tls"
"encoding/base64"
"encoding/json"
"encoding/pem"
"flag"
@fengxsong
fengxsong / sshd.go
Created Oct 13, 2016
sshd proxy...
View sshd.go
package main
import (
"errors"
"flag"
"fmt"
"io"
"log"
"net"
"strings"
You can’t perform that action at this time.