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 -ex | |
git_branch="v1.3-patch" | |
git_base="https://github.com/rstudio/rstudio" | |
QT_VERSION=5.15.0 | |
now=$(date +"%m%d%Y%H%M") | |
#docker build --pull --no-cache -f Dockerfile.focal-amd64 -t rstudio:focal-amd64 . | |
# following from https://stackoverflow.com/a/246128 | |
SOURCE="${BASH_SOURCE[0]}" | |
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink | |
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )" |
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 | |
# Put this script into your crontab e.g. | |
# @reboot ~/bin/bounce_ipv6.sh | |
# Bounce IPv6 connection if router is up but IPv6 connectivity is down, | |
# and check the connection every 30 seconds. | |
router_address="192.168.0.1" | |
ipvsixaddress="2600::" | |
while true; | |
do | |
if ping -c1 $router_address &>/dev/null; then |
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 |
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
#!/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 | |
# 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/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
# 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/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
#!/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 |