This file contains 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 | |
# chromeos_docker.sh | |
# Usage: | |
# REPOSITORY=YOUR_DOCKER_HUB_REPOSITORY_NAME chromeos_docker.sh recovery_file_url container_name chromeos_milestone arch | |
# or if image.bin already exists this works too: | |
# chromeos_docker.sh dummy name milestone arch | |
# (Default is not to delete the image after download.) | |
# e.g. | |
# Example for x86_64: | |
# chromeos_docker.sh https://dl.google.com/dl/edgedl/chromeos/recovery/chromeos_13816.82.0_nocturne_recovery_stable-channel_mp.bin.zip nocturne 90 x86_64 |
This file contains 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 [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then | |
SESSION_TYPE=remote/ssh | |
elif pstree -p | egrep --quiet --extended-regexp ".*sshd.*\($$\)"; then | |
SESSION_TYPE=remote/ssh | |
else | |
case $(ps -o comm= -p $PPID) in | |
sshd|*/sshd) SESSION_TYPE=remote/ssh;; | |
esac | |
fi |
This file contains 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 | |
# This goes in /usr/share/initramfs-tools/hooks/usbtrim | |
case $1 in | |
prereqs) | |
echo "udev" | |
exit 0 | |
;; | |
esac |
This file contains 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
# Goes in .bashrc | |
# Heavily cribbed from | |
# https://stackoverflow.com/a/16715681 | |
# and inspired by | |
# https://unix.stackexchange.com/a/420090 | |
__prompt_command() { | |
local EXIT="$?" # This needs to be first | |
PS1="" | |
local RCol='\[\e[0m\]' |
This file contains 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 | |
# this goes into /etc/initramfs-tools/scripts/init-premount/a_enable_wireless | |
PREREQ="" | |
prereqs() | |
{ | |
echo "$PREREQ" | |
} | |
case $1 in | |
prereqs) |
This file contains 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 | |
# raspios.sh | |
# Usage: | |
# REPOSITORY=YOUR_DOCKER_HUB_REPOSITORY_type raspios image_file_url debian_release type date ARCH | |
# or if img already exists this works too: | |
# raspios.sh dummy debian_release type date ARCH | |
# (Default is not to delete the image after download.) | |
# e.g. | |
# Example for arm64: | |
# ./raspios.sh https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2023-12-06/2023-12-05-raspios-bookworm-arm64-lite.img.xz bookworm lite 2023-12-06 arm64 |
This file contains 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 -x | |
# make_arm64_rpi_kernel_debs.sh | |
# Builds arm64 debian packages from the CURRENT rpi firmware repository kernel which is installed by: | |
# sudo rpi-update | |
# This runs on an arm64 host with arm64 compilation tools... | |
# or with some sort of cross-compilation setup. | |
# Debs are put in $workdir/build | |
# | |
# This will NOT work in Raspbian unless you have an arm64 compilation | |
# environment setup. Appears to work on |
This file contains 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 -x | |
workdir="${HOME}/workdir" | |
[[ ! -d "$workdir" ]] && ( mkdir -p "$workdir" || exit 1) | |
[[ ! -d "$workdir"/tmp ]] && ( mkdir -p "$workdir"/tmp || exit 1) | |
[[ ! -d "$workdir"/output ]] && ( mkdir -p "$workdir"/output || exit 1) | |
echo "workdir is ${workdir}" | |
tmpdir=$(mktemp -d deb_XXXX -p "$workdir"/tmp) | |
deb_temp=${tmpdir}/deb | |
extract_tmp=${tmpdir}/extract |
This file contains 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 -x | |
main () { | |
VER=10 | |
export CC="ccache gcc-${VER}" | |
export CXX="ccache g++-${VER}" | |
export SHLIB_CXXLD="g++-${VER}" | |
#FC="ccache gfortran" | |
#F77="ccache gfortran" | |
zfs_work="$(pwd)/$(uname -m)" | |
mkdir -p "${zfs_work}" |
This file contains 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://www.spotpear.com/learn/EN/raspberry-pi/Raspberry-Pi-LCD/Raspberry-Pi-_Rotate-the-screen-display.html | |
Raspberry Pi - Rotate the screen display | |
Raspberry Pi 2.4/3.2 inch LCD | |
Rotate display | |
sudo nano /boot/config.txt |
NewerOlder