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
| """Example usage: | |
| In [1]: !cat ayy.s | |
| .text | |
| .global _start | |
| .type _start, @function | |
| _start: | |
| movq $10, %rdx | |
| pushw $10 |
Among computer programmers, a “gotcha” has become a term for a feature of a programming language that is likely to play tricks on you to display behavior that is different than what you expect.
Just as a fly or a mosquito can “bite” you, we say that a gotcha can “bite” you. So, let's proceed to examine some of Python's gotchas !
| ### | |
| ### | |
| ### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
| ### https://christitus.com/windows-tool/ | |
| ### https://github.com/ChrisTitusTech/winutil | |
| ### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
| ### iwr -useb https://christitus.com/win | iex | |
| ### | |
| ### OR take a look at | |
| ### https://github.com/HotCakeX/Harden-Windows-Security |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Build a pip-compatible sdist for the flit package in the current directory. | |
| """ | |
| import flit, zipfile, os.path | |
| def build_sdist(): | |
| # build wheel |
In a project I'm working on I ran into the requirement of having some sort of persistent FIFO buffer or pipe in Linux, i.e. something file-like that could accept writes from a process and persist it to disk until a second process reads (and acknowledges) it. The persistence should be both across process restarts as well as OS restarts.
AFAICT unfortunately in the Linux world such a primitive does not exist (named pipes/FIFOs do not persist
| /* bling.js */ | |
| window.$ = document.querySelector.bind(document); | |
| window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
| #!/usr/bin/env bash | |
| git remote -v | grep fetch | grep github | \ | |
| while read remote url _; do | |
| if ! git config --get-all "remote.$remote.fetch" | grep -q refs/pull | |
| then | |
| git config --add "remote.$remote.fetch" \ | |
| '+refs/pull/*/head:refs/remotes/'"$remote"'/pull/*' | |
| fi | |
| done |
| import sys | |
| import warnings | |
| from types import ModuleType | |
| from importlib import import_module | |
| try: | |
| basestring | |
| except NameError: | |
| basestring = str |
| .PHONY: hook | |
| CC=gcc -std=c99 -Wall | |
| hook: hook-main hook-preload.so | |
| ./hook-main | |
| LD_PRELOAD=./hook-preload.so ./hook-main | |
| hook-main: hook-main.c | |
| ${CC} -O0 -Wl,--export-dynamic -g -ggdb -o $@ $^ -ldl |