Skip to content

Instantly share code, notes, and snippets.

View wlan0's full-sized avatar
:octocat:

Sidhartha Mani wlan0

:octocat:
View GitHub Profile
@wlan0
wlan0 / HowToOTG.md
Created November 6, 2021 06:53 — forked from gbaman/HowToOTG.md
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@wlan0
wlan0 / gist:4a92b8bb5895d971c07056a81b657b4d
Created March 17, 2021 00:59
DirectCSI SECCOMP profile
{
"defaultAction": "SCMP_ACT_ERRNO",
"archMap": [
{
"architecture": "SCMP_ARCH_X86_64",
"subArchitectures": [
"SCMP_ARCH_X86",
"SCMP_ARCH_X32"
]
},
k8s.io/klog/v2
github.com/pkg/errors
InfoS - Structured Info
klog.InfoS("bucket created successfully", "name", obj.Name, key, values string...)
// bucket created successfully name=bucketname
klog.Infof()
ErrorS - Structured Errors
{
"obdInfo": {
"timestamp": "2020-03-12T19:04:54.241541371-07:00",
"perf": {
"drives": [
{
"addr": "minio",
"serial": [
{
"endpoint": "/tmp/data",
This file has been truncated, but you can view the full file.
{
"obdInfo": {
"timestamp": "2020-03-12T23:05:56.415955835Z",
"perf": {
"drives": [
{
"addr": "minio-1:9000",
"serial": [
{
{
"obdInfo": {
"timestamp": "2020-03-12T20:24:17.197985225Z",
"perf": {
"drives": [
{
"addr": "minio-1:9000",
"serial": [
{
"endpoint": "/data/minio1",
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: minio
labels:
app: minio
spec:
serviceName: minio
podManagementPolicy: Parallel
replicas: 4
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: demo
spec:
replicas: 1
template:
metadata:
labels:
app: demo
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: demo
spec:
replicas: 1
template:
metadata:
labels:
app: demo
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: demo
spec:
replicas: 1
template:
metadata:
labels:
app: demo