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/python3 | |
# dump_bos_descriptors.py | |
# | |
# Scan the USB bus and print out the BOS descriptors for each device, if | |
# they exist. Alternatively, decode and print out the BOS descriptor that | |
# is passed in via stdin. | |
# | |
# Usage: `./dump_bos_descriptors.py [< binary]` | |
# |
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
#!/bin/bash | |
# Set the SSID / password on C4000BG DSL modems | |
# | |
# WARNING: This script does no sanity checking! It does not check | |
# that the SSID is available, or that it is even well-formed (i.e. | |
# 32 octets or less in length). Be careful! | |
set -e |
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
# AWK script to annotate output from usbmon | |
# | |
# Usage: `awk -f usbmon-annotate.awk < usbmon.log` | |
# | |
# Output: If possible, each line of usbmon output will have a human- | |
# readable description of what it is printed out immediately before | |
# the usbmon line itself. | |
# | |
# For example, the following INPUT: | |
# |
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
#!/bin/bash | |
# compare-commit-upstream.sh | |
# | |
# Given a commit ID in the current repository, find the corresponding | |
# upstream commit and print out the difference, if any. If no upstream | |
# commit can be found, print a message and exit with code 0. | |
# | |
# Usage: ./compare-commit-upstream.sh <local-git-commit-id> |
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
#!/bin/bash | |
# Perform a distributed kernel build using icecream and a specific compiler | |
# version. | |
# | |
# For example, you might set SUFFIX=-12 to build with the "gcc-12" compiler. | |
SUFFIX= | |
export PATH=/usr/lib/icecream/bin:$PATH |
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
#!/bin/bash | |
if [[ $# -ne 2 ]]; then | |
echo "GPX to CSV converter for MyFlightBook" | |
echo | |
echo "Converts a GPX file (e.g. from a handheld GPS unit) into a CSV file that" | |
echo "can be imported into MyFlightBook. Performs basic data filtering, event" | |
echo "detection, etc." | |
echo | |
echo "Usage: $0 <start> <stop>" |
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 python | |
import sys | |
import re | |
""" | |
Extract and merge the copyright headers from a list of files. | |
Foreach file: | |
1. Find a copyright header |
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 python | |
""" | |
manifest-calculator.py | |
Calculate the string which must be added to the Chrome OS Manifest file | |
as part of the firmware submission process. | |
Usage: | |
$ ./manifest-calculator.py <lvfs-cabfile> |
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 python | |
# Convert binary Linux kernel input events (e.g. from /dev/input/eventN) | |
# into a human-readable list of events. Takes input from stdin. | |
# | |
# Only supports a limited number of event types/codes, but can be extended | |
# without much effort. | |
# | |
# Usage: `sudo cat /dev/input/event<N> | ./event-bin-to-text.py` | |
# |
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
#!/bin/bash | |
# Usage: capture-multi.sh | |
# Simultaneously capture HID and libinput events from multiple devices | |
# | |
# This script must be run as root in order to read all events. | |
set -e | |
trap cleanup INT QUIT TERM |
NewerOlder