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:c57bfe671287be35ae08d0e7edf292a2
Created August 6, 2018 16:37 — forked from jbeda/gist:2cae7dd22a453c3caa94
URLs for kubernetes release artifacts
$ gsutil ls -R gs://kubernetes-release/release/v0.5.4 | sed 's|gs://kubernetes-release|https://storage.googleapis.com/kubernetes-release|; /^.*:$/d; /^$/d'
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-darwin-386.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-darwin-amd64.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-linux-386.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-linux-amd64.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-client-linux-arm.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-salt.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes-server-linux-amd64.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/kubernetes.tar.gz
https://storage.googleapis.com/kubernetes-release/release/v0.5.4/bin/darwin/386/kubecfg
@wlan0
wlan0 / Makefile
Last active August 29, 2015 14:22 — forked from ghedo/Makefile
# Copyright (C) 2011 Alessandro Ghedini <alessandro@ghedini.me>
# Updated 2012 by Mike Perry to extract syscall table addresses
# Updated 2014 by Francis Brosnan Blázquez to check for ia32 support
obj-m += noptrace2.o
KERNEL_VER=$(shell uname -r)
SCT := $(shell grep " sys_call_table" /boot/System.map-$(KERNEL_VER) | awk '{ print $$1; }')
SCT32 := $(shell grep "ia32_sys_call_table" /boot/System.map-$(KERNEL_VER) | awk '{ print $$1; }')
# ------------- SCRIPT ------------- #
#!/bin/bash
echo
echo "# arguments called with ----> ${@} "
echo "# \$1 ----------------------> $1 "
echo "# \$2 ----------------------> $2 "
echo "# path to me ---------------> ${0} "
echo "# parent path --------------> ${0%/*} "

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname