Commit before push.

This commit is contained in:
cyteen 2024-07-09 00:03:21 +01:00
parent 389842ff13
commit 33c5a5499c
7 changed files with 193 additions and 31 deletions

View File

@ -250,6 +250,15 @@ cat <<-'EOF' | sudo tee /etc/udev/rules.d/60-st-linkv2.rules
#LABEL="st-link-v2-programming_rules_end"
EOF
cat <<-'EOF' | sudo tee /etc/udev/rules.d/60-st-linkv2_1.rules
## Now in stlink-utils 49-stlinkv2-1.rules
#SUBSYSTEM!="usb", GOTO="st-link-v2-1-programming_rules_end"
#
#ATTRS{idVendor}=="0483", ATTRS{idProduct}=="374b", MODE="0666", GROUP="plugdev"
#
#LABEL="st-link-v2-1-programming_rules_end"
EOF
cat <<-'EOF' | sudo tee /etc/udev/rules.d/60-cp210x.rules
# udev rules file for CP210x device to be programmable py
# cp210x-program

View File

@ -2,7 +2,6 @@
# http://github.com/FreeCAD/FreeCAD/releases/
# debian is still on 0.16 but 0.17 is needed for current workbenches
# the ppa has calculix-ccx eigen3 freecad-daily (0.18~beta1) opencascade
# ppa:freecad-maintainers/freecad-daily
@ -14,16 +13,10 @@
# community: * * * *
# elmer: * * * * * *
YOUR_UBUNTU_VERSION_HERE=kinetic # 22.10 buster/sid
# YOUR_UBUNTU_VERSION_HERE=goovy # 20.10 buster/sid
# YOUR_UBUNTU_VERSION_HERE=focal # 20.04 buster/sid
# YOUR_UBUNTU_VERSION_HERE=eoan # 19.10 buster/sid
# YOUR_UBUNTU_VERSION_HERE=disco # 19.04 buster/sid
# YOUR_UBUNTU_VERSION_HERE=cosmic # 18.10 buster/sid
# YOUR_UBUNTU_VERSION_HERE=bionic # 18.04 buster/sid
# YOUR_UBUNTU_VERSION_HERE=artful # 17.10 stretch/sid
# YOUR_UBUNTU_VERSION_HERE=xenial # 16.04 stretch/sid
# YOUR_UBUNTU_VERSION_HERE=trusty # 14.04 jessie/sid
# YOUR_UBUNTU_VERSION_HERE=noble # 24.04 LTS buster/sid
YOUR_UBUNTU_VERSION_HERE=mantic # 22.04 LTS buster/sid
# YOUR_UBUNTU_VERSION_HERE=jammy # 22.04 LTS buster/sid
# YOUR_UBUNTU_VERSION_HERE=focal # 20.04 LTS buster/sid
sudo bash -c "cat > /etc/apt/sources.list-available/freecad-daily.list" <<EOF
deb http://ppa.launchpad.net/freecad-maintainers/freecad-daily/ubuntu $YOUR_UBUNTU_VERSION_HERE main
@ -61,7 +54,6 @@ sudo apt update
# If building, use cmake gui for configuring the build.
sudo apt install -y cmake-qt-gui python3-numpy vtk9 python3-vtk9 z88
sudo apt install -y freecad-daily calculix-ccx elmerfem-csc
### Netgen
@ -112,7 +104,6 @@ sudo apt install -y netgen python3-netgen
# opencascade in experimental
# https://ftp-master.debian.org/new/opencascade_7.2.0+dfsg1-1.html
# http://github.com/qingfengxia/FenicsSolver
# Available as addon in freecad interface
@ -185,7 +176,7 @@ apt update -o Acquire::CompressionTypes::Order::=gz && apt upgrade -y && apt ins
# Mystran
MYSTRAN_BUILD=/var/tmp/mystran_build
mkdir ${MYSTRAN_BUILD}
mkdir -p ${MYSTRAN_BUILD}
pushd ${MYSTRAN_BUILD} || exit
git clone https://github.com/MYSTRANsolver/MYSTRAN.git mystran

19
020_github-api.sh Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# https://github.com/settings/tokens
# DEST=${1:-/etc/skel}
DEST=${HOME}
GITHUB_API_TOKEN="yEum5b7vNJ9mOjxUp7NJS1fiyWJFlSvUeFiBeljv"
# PLugins that Use COHERE_API_KEYs get called early so so we need to put them
# in .zshrc.pre-plugins.d so they can be loaded before the plugins are loaded.
cat <<-EOF | sudo tee "${DEST}"/.zshrc.pre-plugins.d/009_github.zsh
export GITHUB_API_TOKEN="${GITHUB_API_TOKEN}"
EOF
# a couple of github specific packages
apt-get install -f gist gh
apt-get -f install

19
020_gitlab-api.sh Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html
# DEST=${1:-/etc/skel}
DEST=${HOME}
GITLAB_PA_TOKEN="yEum5b7vNJ9mOjxUp7NJS1fiyWJFlSvUeFiBeljv"
# PLugins that Use COHERE_API_KEYs get called early so so we need to put them
# in .zshrc.pre-plugins.d so they can be loaded before the plugins are loaded.
cat <<-EOF | sudo tee "${DEST}"/.zshrc.pre-plugins.d/009_gitlab.zsh
export GITLAB_PA_TOKEN="${GITHUB_PA_TOKEN}"
EOF
# a couple of github specific packages
apt-get install -y gitlab-cl
apt-get -f install

73
020_gpsd.sh Normal file
View File

@ -0,0 +1,73 @@
#!/usr/bin/env bash
# The goal is tobe able to attach a u-blox NEO-6M gps module via a
# usb->serial converter and change its settings using ubxtools from
# gpsd-clients.
#
# See: https://gpsd.io/ubxtool-examples.html
#
# The minimal binary protocol allows for 10Hz update
#
sudo apt-get install -y gpsd gpsd-tools gpsd-clients
# A u-blox 6 assume protocol version 12
CURRENT_VERSION=$(ubxtool -p MON-VER)
echo "Current Version: ${CURRENT_VERSION}"
export UBXOPTS="-P 12"
# Reset to factory defaults
ubxtool -p RESET
# Enable binary messages
ubxtool -e BINARY
# Disable NMEA
ubxtool -d NMEA
# Rate settings - slow for low power, high for fast to compute fix in dynamic
# environments.
# Current rate:
echo "Before rate: $(ubxtool -p CFG_RATE)"
# Change to 10Hz measurement and fix rate (in milliseconds)
ubxtool -p CFG-RATE,100
# New rate:
echo "After rate: $(ubxtool -p CFG_RATE)"
# Check constellations (GPS only for 7 and below)
ubxtool -p MON_GNSS
# https://gist.githubusercontent.com/jnunyez/519f3f1a807d0f2b4dc8bd307e11c066/raw/003927f12a5ec4378b98e66b1dec392fe7129b3f/useful-commands-environment
# grep ubxtool /tmp/useful-commands-environment.txt
#
# ubxtool -g CFG-TMODE-SVIN_MIN_DUR -P 29.20
# ubxtool -t -p TIM-SVIN -P 29.20
# ubxtool -t -p NAV-CLOCK -P 29.20
# ubxtool -t -p TIM-SVIN -P 29.20
# ubxtool -t -P 29.20 -e SURVEYIN,86400,1000
(#ubxtool -t -p TIM-SVIN -P 29.20) meanV should decrease over time
# ubxtool -v 1 -P 29.20 -z CFG-TMODE-ECEF_X,<value>,5 -w 1
# ubxtool -v 1 -P 29.20 -z CFG-TMODE-ECEF_Y,<value>,5 -w 1
# ubxtool -v 1 -P 29.20 -z CFG-TMODE-ECEF_Z,<value>,5 -w 1
# ubxtool -v 1 -P 29.20 -z CFG-TMODE-MODE,2,5 -v 1 -w 1
# ubxtool -v 1 -P 29.20 -g CFG-TMODE-MODE,0 -v 1
# ubxtool -v 1 -P 29.20 -g CFG-TMODE-ECEF_X,2 -v 1
# ubxtool -v 1 -P 29.20 -g CFG-TMODE-ECEF_Y,2 -v 1
# ubxtool -v 1 -P 29.20 -g CFG-TMODE-ECEF_Z,2 -v 1
# ubxtool -P 29.20 -w 1 -v 3 -z CFG-NAVSPG-INFIL_NCNOTHRS,50,1
# ubxtool -P 29.20 -w 1 -v 3 -z CFG-NAVSPG-INFIL_NCNOTHRS,0,1
# ubxtool -g CFG-TP-ANT_CABLEDELAY -P 29.20
# ubxtool -v 1 -P 29.20 -z CFG-HW-ANT_CFG_VOLTCTRL,1
# ubxtool -v 1 -P 29.20 -p MON-RF
# ubxtool -p CFG-GNSS
# ubxtool -g CFG-TMODE-SVIN_MIN_DUR -P 29.20
# ubxtool -t -p NAV-CLOCK -P 29.20
# ubxtool -t -P 29.20 -v 1 -e SURVEYIN,60,20000
# ubxtool: enable SURVEYIN,60,20000
# ubxtool -t -p TIM-SVIN -P 29.20
# ubxtool -t -p NAV-STATUS -P 29.20
# ubxtool -p CFG-TP5

View File

@ -79,7 +79,7 @@ apt-get install \
### /home/default/.local/share/kicad/5.99/scripting/plugins
### /home/default/.local/share/kicad/5.99/3rdparty/plugins
# ~/.kicad_plugins/
KICAD_SCRIPTS=${HOME}/.local/share/kicad/7.0/scripting/plugins/
KICAD_SCRIPTS=${HOME}/.local/share/kicad/8.0/scripting/plugins/
mkdir -p "${KICAD_SCRIPTS}"
# Rounded tracks

51
020_kisak-mesa.sh Executable file
View File

@ -0,0 +1,51 @@
#!/usr/bin/env bash
# sudo apt install -y kodi
# 18.04 bionic buster
# 17.10 artful stretch
PROJECT="kisak-mesa"
PROJECT_URL="https://launchpad.net/~"${PROJECT}"/+archive/ubuntu/ppa"
PROJECT_PAGE="$(curl -sS "${PROJECT_URL}")"
KEY_LINK_XPATH='string(//*[@id="signing-key"]/dd[1]/a[1]/@href)'
KEY_LINK="$(echo "${PROJECT_PAGE}" | xmllint --html --xpath "${KEY_LINK_XPATH}" - 2>/dev/null)"
FINGERPRINT_XPATH='string(//*[@id="signing-key"]/dd[1]/a[1]/code)'
FINGERPRINT="$(echo "${PROJECT_PAGE}" | xmllint --html --xpath "${FINGERPRINT_XPATH}" - 2>/dev/null)"
KEY_ID_XPATH='string(//*[@id="signing-key"]/dd[2])'
KEY_ID="$(echo "${PROJECT_PAGE}" | xmllint --html --xpath "${KEY_ID_XPATH}" - 2>/dev/null)"
# set arch
ARCH=$(dpkg --print-architecture)
# Download the key
KEY_SERVER="keyserver.ubuntu.com"
KEY_DIR="/etc/apt/trusted.gpg.d/"
SIGNED_BY="${KEY_DIR}/${PROJECT}.gpg"
sudo gpg --homedir /tmp --no-default-keyring --keyring "${SIGNED_BY}" --keyserver "${KEY_SERVER}" --recv-keys "${KEY_ID}
RELEASE="mantic"
sudo echo "deb [arch=${ARCH} signed-by=${SIGNED_BY}] http://ppa.launchpad.net/${PROJECT}/ppa/ubuntu ${RELEASE} main" > /etc/apt/sources.list-available/${PROJECT}.list
sudo echo "deb-src [arch=${ARCH} signed-by=${SIGNED_BY}] http://ppa.launchpad.net/${PROJECT}/ppa/ubuntu ${RELEASE} main" >> /etc/apt/sources.list-available/${PROJECT}.list
sudo ln -sf /etc/apt/sources.list-available/${PROJECT.list /etc/apt/sources.list.d/${PROJECT}.list
sudo apt update
packages=" \
mesa-vulkan-drivers \
libgl1-mesa-dri \
libglx-mesa0 \
glmark2 \
tzdata \
"
packages_missing=""
sudo apt install -y --no-install-recommends $packages
# sudo apt install -y --no-install-recommends $packages_missing
# sudo apt install -y --no-install-recommends