by Glenn Matlin / glennmatlin on all socials
- Download and copy all files in this gist to
~/.claude/ - Move the
.pyfiles to~/.claude/hooks - Restart Claude Code.
Author: Chris Lattner
| apiVersion: v1 | |
| kind: ReplicationController | |
| metadata: | |
| name: kube-registry-v0 | |
| namespace: kube-system | |
| labels: | |
| k8s-app: kube-registry | |
| version: v0 | |
| spec: | |
| replicas: 1 |
| Calico | Flannel | Weave | Docker Overlay Network | |
|---|---|---|---|---|
| Network Model | Pure Layer-3 Solution | VxLAN or UDP Channel | VxLAN or UDP Channel | VxLAN |
| Application Isolation | Profile Schema | CIDR Schema | CIDR Schema | CIDR Schema |
| Protocol Support | TCP, UDP, ICMP & ICMPv6 | ALL | ALL | ALL |
| #!/usr/bin/env python | |
| import re | |
| import os | |
| import sys | |
| import threading | |
| import subprocess | |
| import getopt | |
| import time |
| #!/usr/bin/env python | |
| """Run `snort -A console` command using a pipe. | |
| Warning! Alerts are delayed until snort's stdout buffer is flushed. | |
| """ | |
| from __future__ import print_function | |
| from subprocess import Popen, PIPE, STDOUT | |
| snort_process = Popen(['snort', '-A', 'console', '-c', 'snort.conf'], | |
| stdout=PIPE, stderr=STDOUT, bufsize=1, |
| package main | |
| import ( | |
| "github.com/gin-gonic/gin" | |
| "database/sql" | |
| "github.com/coopernurse/gorp" | |
| _ "github.com/mattn/go-sqlite3" | |
| "log" | |
| "time" | |
| "strconv" |
| var AWS = require('aws-sdk'); | |
| AWS.config.update({ | |
| accessKeyId: '{AWS_KEY}', | |
| secretAccessKey: '{AWS_SECRET}', | |
| region: '{SNS_REGION}' | |
| }); | |
| var sns = new AWS.SNS(); |
#Container Resource Allocation Options in docker-run
now see: https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources
You have various options for controlling resources (cpu, memory, disk) in docker. These are principally via the docker-run command options.
##Dynamic CPU Allocation
-c, --cpu-shares=0
CPU shares (relative weight, specify some numeric value which is used to allocate relative cpu share)
| # installation | |
| sudo apt-get install honeyd | |
| sudo apt-get install nmap #(supported software for port scanning) | |
| # check my eth0 address | |
| ifconfig | |
| ### eth0 Link encap:Ethernet HWaddr 00:26:2d:f9:db:be <-----------------use this one | |
| ### inet addr:192.168.0.103 Bcast:192.168.0.255 Mask:255.255.255.0 | |
| ### inet6 addr: fe80::226:2dff:fef9:dbbe/64 Scope:Link | |