Skip to content

Instantly share code, notes, and snippets.

apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
component: resolv
tier: node
name: resolv
namespace: default
spec:
selector:
@henrylilei
henrylilei / aks-node-kubelet-configuration.yaml
Created November 5, 2019 01:47
Using Kured to update kubelet config in AKS.
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: server-maintenance-priority
value: 1000000
globalDefault: false
description: "This priority class should be used for server maintenance pods only. It will be scheduled first to the node."
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
@BretFisher
BretFisher / docker-for-mac.md
Last active November 8, 2024 13:45
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@so0k
so0k / kubectl.md
Last active September 11, 2024 08:36
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@chrisRedwine
chrisRedwine / pip_install
Created July 20, 2016 18:00
Pip install a specific github repo tag or branch
# From https://coderwall.com/p/-wbo5q/pip-install-a-specific-github-repo-tag-or-branch
pip install -e git://github.com/{ username }/{ reponame }.git@{ tag name }#egg={ desired egg name }
@chinshr
chinshr / Jenkinsfile
Last active October 24, 2024 17:13
Best of Jenkinsfile, a collection of useful workflow scripts ready to be copied into your Jenkinsfile on a per use basis.
#!groovy
# Best of Jenkinsfile
# `Jenkinsfile` is a groovy script DSL for defining CI/CD workflows for Jenkins
node {
}
@nerdalert
nerdalert / Netfilter-IPTables-Diagrams.md
Last active November 18, 2024 12:32
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.

@dfang
dfang / mirrors
Last active March 11, 2022 15:48
Mirrors in China
# mirrors in China
## rubygems mirror(ruby.taobao.org)
use ruby.taobao.org as mirror on local machine(https://ruby-china.org/topics/15534)
`bundle config mirror.https://rubygems.org http://ruby.taobao.org`
`less ~/.bundle/config`
## npm mirror(npm.taobao.org)
https://cnodejs.org/topic/4f9904f9407edba21468f31e
http://riny.net/2014/cnpm/
@tdoly
tdoly / v2ex_auto_login.py
Last active May 24, 2019 13:28
v2ex 自动登录,领取金币脚本
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import sys
import logging
import datetime
import requests
import BeautifulSoup
from requests.adapters import HTTPAdapter