This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bus 001 Device 002: ID 2bef:9065 Quanta Storage Inc. QSI Thunderbolt4 Godzilla Hub | |
Device Descriptor: | |
bLength 18 | |
bDescriptorType 1 | |
bcdUSB 2.01 | |
bDeviceClass 0 | |
bDeviceSubClass 0 | |
bDeviceProtocol 0 | |
bMaxPacketSize0 8 | |
idVendor 0x2bef |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Paste in browser console and run | |
async function deleteStaleBranches(delay=500) { | |
var stale_branches = document.getElementsByClassName('js-branch-delete-button'); | |
for (var i = 0; i < stale_branches.length; i++) | |
{ | |
stale_branches.item(i).click(); | |
await new Promise(r => setTimeout(r, delay)); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
View: Pods(<namespace>)[number of pods listed] | |
NAME pod name | |
READY number of pods in ready state / number of pods to be in ready state | |
RESTARTS number of times the pod has been restarted so far | |
STATUS state of the pod life cycle, such as Running | ... | Completed | |
CPU current CPU usage, unit is milli-vCPU | |
MEM current main memory usage, unit is MiB | |
%CPU/R current CPU usage as a percentage of what has been requested by the pod | |
%MEM/R current main memory usage as a percentage of what has been requested by the pod |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import hashlib | |
from Crypto import Random | |
from Crypto.Cipher import AES | |
from base64 import b64encode, b64decode | |
class AESCipher(object): | |
def __init__(self, key): | |
self.block_size = AES.block_size | |
self.key = hashlib.sha256(key.encode()).digest() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
function walk() { | |
for secret in $(vault list $1 | tail -n +3) | |
do | |
if [[ ${secret} == *"/" ]] ; then | |
walk "${1}${secret}" | |
else | |
echo "${1}${secret}" | |
fi |
You will need:
This guide is based on Ubuntu, for other OS, use their package manager instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
files.download('example.txt') # from colab to browser download |
In programming, a paradigm is an abstract way to understand and solve a problem. A paradigm is like a perspective, a high point from which you can survey the terrain and try to decide the path your journey will take.
Toay, there are three major programming paradigms:
- Imperative Programming.
- Object Oriented Programming (OOP).
- Functional Programming (FP).
In principle any language can be used to program in any paradigm, but in practice certain languages tend to favor certain paradigms.
NewerOlder