Skip to content

Instantly share code, notes, and snippets.

View wppurking's full-sized avatar

wppurking wppurking

View GitHub Profile
[
{
"pageTitle": "Amazon.com | ALEADER Women's Quick Drying Aqua Water Shoes Blue 6 D(M) US/FR 36 | Water Shoes",
"station": "US",
"asin": "B00U5ZNDL8",
"parent": "B07JJPBLMR",
"title": "Aleader Women's Quick Drying Aqua Water Shoes",
"alias": "B07JJPBLMR",
"brand": "ALEADER",
"brandUrl": "/stores/ALEADER/page/72B7A30C-C6B9-4019-91F9-3253BFB867C4?ref_=ast_bln",
@wppurking
wppurking / kitsunebi.phone.conf
Last active December 16, 2020 08:23
kitsunebi.phone.conf
[RoutingRule]
DOMAIN-KEYWORD, geosite:category-ads-all, Reject
# Bypass mainland china domains.
DOMAIN-KEYWORD, geosite:cn, Direct
# Bypass mainland china IPs and LAN IPs.
GEOIP, private, Direct
# China IP
@wppurking
wppurking / build.log
Created December 15, 2019 17:34
集群构建日志
wyatt@mbp:examples/kaniko ‹master*›$ skaffold run --tail
Generating tags...
- wppurking/skaffold-example -> wppurking/skaffold-example:00b8d53-dirty
Checking cache...
- wppurking/skaffold-example: Not found. Building
Creating kaniko secret [default/kaniko-secret]...
Creating docker config secret [docker-cfg]...
Building [wppurking/skaffold-example]...
Uploading sources to wp-skaffold-kaniko GCS bucket
INFO[0001] Resolved base name golang:1.12.9-alpine3.10 to golang:1.12.9-alpine3.10
@wppurking
wppurking / echo-server.yaml
Created December 5, 2019 03:04
hello-wrold k8s
---
# 通过 Deployment 部署 echo-server
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: echo-server
name: echo-server
spec:
replicas: 2
@wppurking
wppurking / metricbeat.yaml
Last active November 21, 2019 04:03
做过调整的 metricbeat.yaml, 权限部分调整, 配置也根据自己需要调整了
---
apiVersion: v1
kind: ConfigMap
metadata:
name: metricbeat-daemonset-config
namespace: kube-system
labels:
k8s-app: metricbeat
data:
metricbeat.yml: |-
@wppurking
wppurking / filebeat.yaml
Last active November 20, 2019 18:33
完成正 filebeat.yaml 部署 k8s 监控, 调整了对索引的配置
---
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
labels:
k8s-app: filebeat
data:
filebeat.yml: |-
@wppurking
wppurking / nginx-ingress.yaml
Last active December 10, 2019 10:36
Baremetal ingress controller
apiVersion: v1
kind: Namespace
metadata:
name: ingress-nginx
labels:
app.kubernetes.io/name: ingress-nginx
app.kubernetes.io/part-of: ingress-nginx
---
kind: ConfigMap
apiVersion: v1
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
# 源碼
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.tencentyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.tencentyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.tencentyun.com/ubuntu/ bionic-updates main restricted universe multiverse
# deb http://mirrors.tencentyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
# deb http://mirrors.tencentyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.tencentyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.tencentyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.tencentyun.com/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src http://mirrors.tencentyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
require 'libusb'
# 初始化 Libusb context
usb = LIBUSB::Context.new
# 通过固定的 idVendor 获取 zebra 的第一个 usb 设备.
# https://usb-ids.gowdy.us/read/UD/
d = usb.devices(idVendor: 0x0a5f).first
# 通过 device 获取用于操作 io 的 DevHandler
h = d.open
# 获取需要操作的的第一个 usb interface 的句柄