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
# /etc/systemd/network/eth.network | |
# Pass nfsroot=... on the kernel command line as you'd expect | |
[Match] | |
Name=eth* | |
KernelCommandLine=!nfsroot | |
[Network] | |
DHCP=v4 | |
[DHCPv4] |
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/sh | |
set -e | |
#set -x | |
CONFIGFS="/sys/kernel/config" | |
GADGET="$CONFIGFS/usb_gadget" | |
VID="0x0525" | |
PID="0xa4a2" | |
SERIAL="0123456789" |
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
// Tracking cursor position in real-time without JavaScript | |
// Demo: https://twitter.com/davywtf/status/1124146339259002881 | |
package main | |
import ( | |
"fmt" | |
"net/http" | |
"strings" | |
) |
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 | |
CONFIG_HZ=$1 | |
# The output of timeconst.sh is parsed by sed to remove the | |
# following diff from each comparison | |
# --- BC | |
# +++ SH | |
# @@ -1,4 +1,4 @@ |
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
From: | |
https://github.com/zephyrproject-rtos/zephyr/blob/master/boards/arm/96b_wistrio/96b_lscon.dtsi | |
/* | |
* Copyright (c) 2019 Linaro Ltd. | |
* | |
* SPDX-License-Identifier: Apache-2.0 | |
*/ | |
/ { |
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/sh | |
CONTAINER="$1" | |
shift | |
XFORWARD="-e DISPLAY=$DISPLAY.0 -v /tmp/.X11-unix:/tmp/.X11-unix" | |
# | |
# We can now run in 'arm64' containers: | |
# docker run -it --rm multiarch/alpine:aarch64-edge |
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/sh | |
TARGETIP=$1 | |
DEV=${2:-/dev/media0} | |
ssh $TARGETIP -o StrictHostKeyChecking=no \ | |
-tC \ | |
media-ctl -d $DEV --print-dot 2>/dev/null | \ | |
grep -v bash | \ | |
tee /tmp/$TARGETIP-mc.dot | \ |
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 | |
# We default to enabling the most debug | |
# (that's why we're being used right) | |
FILTER="*" | |
LEVEL="0" | |
while [[ $# -gt 0 ]] | |
do |
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 | |
# Stop on errors | |
set -e | |
function build() { | |
echo "Building for $1" | |
export BUILDDIR=build-$1 | |
export CC=$2 |
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 | |
MEDIA=/dev/$(grep VIMC /sys/bus/media/devices/media*/model | sed 's/.*\(media[0-9]*\).*/\1/g') | |
function v4l2_dev() { | |
grep "$1" /sys/class/video4linux/video*/name | sed 's#.*\(video[0-9]*\)/.*#\1#g' | |
} | |
RAW0=/dev/$(v4l2_dev "Raw Capture 0") | |
RAW1=/dev/$(v4l2_dev "Raw Capture 1") |