Skip to content

Instantly share code, notes, and snippets.

@bdmihai
bdmihai / list-usb.sh
Created July 14, 2019 20:38
List usb
#!/bin/sh
for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do
(
syspath="${sysdevpath%/dev}"
devname="$(udevadm info -q name -p $syspath)"
[[ "$devname" == "bus/"* ]] && continue
eval "$(udevadm info -q property --export -p $syspath)"
[[ -z "$ID_SERIAL" ]] && continue
echo "/dev/$devname - $ID_SERIAL"
@bdmihai
bdmihai / launch.json
Created July 14, 2019 20:35
Esp32 - vscode launch
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Debug",
"type": "gdb",
"request": "launch",
@bdmihai
bdmihai / tasks.json
Created July 14, 2019 20:31
ESp32 - vscode tasks definition
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "list-usb",
"type": "shell",
"command": "./.vscode/list-usb.sh"
},