Skip to content

Instantly share code, notes, and snippets.

View cizixs's full-sized avatar
:octocat:
cloud native coding...

cizixs cizixs

:octocat:
cloud native coding...
View GitHub Profile
@cizixs
cizixs / simple-exec-with-docker-remote-api.sh
Created October 1, 2018 05:31 — forked from markjlorenz/simple-exec-with-docker-remote-api.sh
Using the exec command with the docker API, and capturing output
#! /usr/bin/env bash
# Create the container with a long running process. If PID1 exists before
# we send the exec commands, they will fail because the container is not running
#
CONTAINER_NAME="TEST-`uuidgen`"
curl --silent --unix-socket /var/run/docker.sock "http:/containers/create?name=${CONTAINER_NAME}" -XPOST \
-H "Content-Type: application/json" \
-d '{
"Image": "ruby:latest",
@cizixs
cizixs / useful_pandas_snippets.py
Created July 25, 2018 13:26 — forked from bsweger/useful_pandas_snippets.md
Useful Pandas Snippets
# List unique values in a DataFrame column
# h/t @makmanalp for the updated syntax!
df['Column Name'].unique()
# Convert Series datatype to numeric (will error if column has non-numeric values)
# h/t @makmanalp
pd.to_numeric(df['Column Name'])
# Convert Series datatype to numeric, changing non-numeric values to NaN
# h/t @makmanalp for the updated syntax!

##分布式系统(Distributed System)资料


#####希望转载的朋友,你可以不用联系我.但是一定要保留原文链接,因为这个项目还在继续也在不定期更新.希望看到文章的朋友能够学到更多.

介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.

@cizixs
cizixs / Netfilter-IPTables-Diagrams.md
Created April 17, 2018 09:35 — forked from nerdalert/Netfilter-IPTables-Diagrams.md
Linux NetFilter, IP Tables and Conntrack Diagrams

Linux NetFilter, IP Tables and Conntrack Diagrams

IPTABLES TABLES and CHAINS

IPTables has the following 4 built-in tables.

1) Filter Table

Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.

@cizixs
cizixs / README.md
Created February 28, 2018 10:41 — forked from magnetikonline/README.md
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Removal
Delete shortest match of needle from front of haystack ${haystack#needle}
@cizixs
cizixs / set_container.sh
Created September 21, 2017 06:03
set up vxlan lab environment
#/usr/bin/env sh
set -e
if [ $# -ne 3 ]; then
echo "Usage: $0 bridgename containername containerip"
exit 1
fi
BRIDGE_NAME=$1
@cizixs
cizixs / dockerfile-chmod
Last active May 3, 2017 08:42
Dockerfile Best Practice
FROM busybox
ADD test.dat /
chmod +x /test.dat
@cizixs
cizixs / kubedns-rc.yml
Created March 31, 2017 05:26
kubernetes dns with kubedns+dnsmasq
# Copyright 2016 The Kubernetes Authors All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@cizixs
cizixs / skydns-rc.yml
Last active March 31, 2017 05:22
Kubernetes DNS addon with etcd+skydns+kube2sky
apiVersion: v1
kind: ReplicationController
metadata:
labels:
k8s-app: kube-dns
kubernetes.io/cluster-service: "true"
name: kube-dns
namespace: kube-system
spec:
replicas: 1