Skip to content

Instantly share code, notes, and snippets.

@sinfere
sinfere / docker-registry-mirrors.md
Created December 9, 2023 08:45 — forked from y0ngb1n/docker-registry-mirrors.md
国内的 Docker Hub 镜像加速器,由国内教育机构与各大云服务商提供的镜像加速服务 | Dockerized 实践 https://github.com/y0ngb1n/dockerized

Docker Hub 镜像加速器

国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。

Dockerized 实践 https://github.com/y0ngb1n/dockerized

配置加速地址

Ubuntu 16.04+、Debian 8+、CentOS 7+

@sinfere
sinfere / vmwk17key.txt
Created August 14, 2023 00:28 — forked from PurpleVibe32/vmwk17key.txt
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
*No spam just license key

Assigning Static IP Addresses in WSL2

WSL2 uses Hyper-V for networking. The WSL2 network settings are ephemeral and configured on demand when any WSL2 instance is first started in a Windows session. The configuration is reset on each Windows restart and the IP addresses change each time. The Windows host creates a hidden switch named "WSL" and a network adapter named "WSL" (appears as "vEthernet (WSL)" in the "Network Connections" panel). The Ubuntu instance creates a corresponding network interface named "eth0".

Assigning static IP addresses to the network interfaces on the Windows host or the WSL2 Ubuntu instance enables support for the following scenarios:

@sinfere
sinfere / beg_redirect.map
Created November 16, 2022 15:35 — forked from troyfontaine/beg_redirect.map
HAProxy Redirecting based on an HTTP Query or a Map with a fallback redirect based on host header
# This file contains only partial paths to match on
# This file should reside in the same directory as the haproxy.cfg simply due to the way it is configured in the sample snippet-but they can go anywhere in the /etc/haproxy directory
/my-partial- https://subdomain3.mydomain.com/my-new-full-path
@sinfere
sinfere / delete_orphaned_veth_docker.sh
Created March 27, 2020 16:05 — forked from daanemanz/delete_orphaned_veth_docker.sh
Delete orphaned veth* interfaces on Docker bridge
#!/bin/bash
veth_in_use=()
veth_unused=()
veth_all=()
function veth_interface_for_container() {
local pid=$(docker inspect -f '{{.State.Pid}}' "${1}")
mkdir -p /var/run/netns
ln -sf /proc/$pid/ns/net "/var/run/netns/${1}"
@sinfere
sinfere / Jenkinsfile
Created March 8, 2020 03:31 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
@sinfere
sinfere / intermediate-certificate-rancher.md
Created February 2, 2020 14:08 — forked from superseb/intermediate-certificate-rancher.md
Generate CA, intermediate CA and server certificate with DNS alt names using Terraform in Docker and launch Rancher

Generate CA, intermediate CA and server certificate with DNS alt names using Terraform in Docker and launch Rancher

Generate CA, intermediate CA and server certificate

docker run --rm -v $PWD/testcerts:/tmp/certs/files -e TF_VAR_ip_addresses='["127.0.0.1"]' -e TF_VAR_dns_names='["yolo.seb.local"]' superseb/intermediate

Run Rancher

@sinfere
sinfere / README.md
Created February 2, 2020 14:07 — forked from superseb/README.md
Generate self signed certificates for Rancher 2.x

Generate self signed certificates for Rancher 2.x

Generate certificates

docker run -v $PWD/certs:/certs \
  -e SSL_SUBJECT=test.example.com \
  -e SSL_DNS=test.example.com,test2.example.com \
  -e SSL_IP=10.0.0.1 \
 superseb/omgwtfssl
@sinfere
sinfere / rancher2ha_selfsigned_layer4lb.md
Created February 2, 2020 14:07 — forked from superseb/rancher2ha_selfsigned_layer4lb.md
Install Rancher 2.0 HA by using self signed certificates (+ intermediate) and Layer 4 Loadbalancer (TCP)

Install Rancher 2.0 HA by using self signed certificates (+ intermediate) and Layer 4 Loadbalancer (TCP)

Warning: the RKE install method is only supported up to v2.0.8!

This gist describes how to setup Rancher 2 HA, by using self signed certificates (with intermediate) and a Layer 4 Loadbalancer (TCP)

Requirements

  • Linux OS
  • OS Binaries
China stock api
1.163_API(0-sh,1-sz):http://api.money.126.net/data/feed/1002151,0600036,hkHSI,hkHSCEI,hk00005
2.QQ_API(sh,sz,s_simple data):http://qt.gtimg.cn/r=0.8409869808238q=s_sz000559,s_sz002434,s_sz002472,s_sz002488,hk00700
3.sina_API(sh,sz,s_simple data):http://hq.sinajs.cn/list=sh600000,sh600004,hk00700,sz002594
# 4.xueqiu_API:http://xueqiu.com/v4/stock/quote.json?code=02318,01211,SH000001,DJI30,HKHSI
163
日内实时盘口(JSON):
http://api.money.126.net/data/feed/1000002,1000001,1000881,0601398,money.api