Commit before push.
This commit is contained in:
parent
77d62d7ff5
commit
a811abcc3e
|
|
@ -1,4 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# In debian/apt there is a new (2016) _apt user that handles getting updates. It needs to be added to Android's INET group so that it can access the network in a chroot environment on android.
|
||||
usermod -g 3003 _apt
|
||||
echo "This script is intended for debian running on android environments."
|
||||
# APT NOT RESOLVING DNS:
|
||||
# In debian/apt there is a new (2016) _apt user that handles getting updates.
|
||||
# On Android with paranoid network, only users in group 3003 aid_inet or 3004 aid_inet_raw can open network sockets.
|
||||
# It needs to be added to Android's INET group so that it can access the network
|
||||
# in a chroot environment on android.
|
||||
#usermod -g 3003 _apt
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
# Retries
|
||||
# Number of retries to perform. If this is non-zero APT will retry failed files the given number of times.
|
||||
|
||||
sudo bash -c "cat > /etc/apt/apt.conf.d/99_parallel" << 'EOF'
|
||||
sudo /bin/bash -c "/bin/cat > /etc/apt/apt.conf.d/99_parallel" << 'EOF'
|
||||
APT::Acquire::Queue-Mode "access";
|
||||
APT::Acquire::Retries 3;
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
#!/usr/bin/env bash
|
||||
echo 'APT::Get::Show-Versions "1";' > /etc/apt/apt.conf.d/verbose
|
||||
echo 'APT::Get::Show-Versions "1";' > /etc/apt/apt.conf.d/99_verbose
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
dpkg --get-selections > /var/tmp/packages.list
|
||||
debconf-get-selections > /var/tmp/debconf-settings.list
|
||||
update-alternatives --get-selections > /var/tmp/alternatives-settings.list
|
||||
/usr/bin/apt-mark showhold > /var/tmp/pkgs_hold.lst
|
||||
/usr/bin/apt-mark showauto > /var/tmp/pkgs_auto.lst
|
||||
/usr/bin/apt-mark showmanual > /var/tmp/pkgs_manual.lst
|
||||
|
||||
|
|
|
|||
|
|
@ -6,4 +6,5 @@ debconf-set-selections /var/tmp/debconf-settings.list
|
|||
update-alternatives --set-selections < /var/tmp/alternatives-settings.list
|
||||
cat /var/tmp/pkgs_auto.lst | xargs apt-mark auto
|
||||
cat /var/tmp/pkgs_manual.lst | xargs apt-mark manual
|
||||
cat /var/tmp/pkgs_hold.lst | xargs apt-mark hold
|
||||
apt-get autoremove
|
||||
|
|
|
|||
|
|
@ -1,4 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# https://fabianlee.org/2020/01/18/docker-placing-limits-on-container-memory-using-cgroups/
|
||||
|
||||
# Internally Docker uses cgroups to limit memory resources, and in its simplest form is exposed as the flags “-m” and “–memory-swap” when bringing up a docker container.
|
||||
|
||||
# sudo docker run -it -m 8m --memory-swap 8m alpine:latest /bin/sh
|
||||
|
||||
# If you see the message above, or “WARNING: Your kernel does not support cgroup swap limit.”,
|
||||
# then modify “/etc/default/grub” as below:
|
||||
|
||||
## Docker likes kernel swappiness support (on reboot)
|
||||
bash -c "$(perl -p -i -e 's/GRUB_CMDLINE_LINUX=""/GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"/g' /etc/default/grub)"
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,9 @@ export MYLC_ALL="en_GB.UTF-8"
|
|||
echo "Europe/London" > /etc/timezone
|
||||
sed -i -e "s/# ${MYLANG}\ UTF-8/${MYLANG}\ UTF-8/" /etc/locale.gen
|
||||
update-locale LANG=${MYLANG}
|
||||
update-locale LANGUAGE=${MYLANGUAGE}
|
||||
update-locale LC_CTYPE=${MYLANG}
|
||||
update-locale LC_ALL=${MYLC_ALL}
|
||||
dpkg-reconfigure --frontend=noninteractive locales
|
||||
|
||||
#export LANGUAGE="${MYLANGUAGE}"
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ apt install -y debconf-utils
|
|||
apt install -y tree
|
||||
apt install -y tmux
|
||||
apt install -y testdisk
|
||||
apt install -y mtd-utils
|
||||
apt install -y autopsy
|
||||
apt install -y udisks2
|
||||
apt install -y ddcutil
|
||||
|
|
@ -30,7 +31,7 @@ apt install -y jq
|
|||
apt install -y pv
|
||||
apt install -y rar
|
||||
apt install -y pixz
|
||||
apt install -y xz
|
||||
apt install -y xz-utils
|
||||
apt install -y unzip
|
||||
apt install -y kpartx
|
||||
apt install -y entr
|
||||
|
|
@ -41,6 +42,7 @@ apt install -y smem smemcap smemstat
|
|||
apt install -y htop
|
||||
apt install -y iotop
|
||||
apt install -y iperf
|
||||
apt install -y lm-sensors
|
||||
apt install -y acpid
|
||||
apt install -y inotify-tools
|
||||
apt install -y libguestfs-tools
|
||||
|
|
@ -78,13 +80,14 @@ apt install -y rsync
|
|||
apt install -y socat
|
||||
apt install -y proot
|
||||
|
||||
apt install -y atril
|
||||
apt install -y pandoc
|
||||
#apt install -y libreoffice-pdfimport
|
||||
|
||||
apt install -y geeqie
|
||||
apt install -y vbindiff
|
||||
apt install -y wxhexeditor
|
||||
apt install -y lshw
|
||||
apt install -y strace
|
||||
|
||||
# window based
|
||||
apt install -y geeqie
|
||||
apt install -y wxhexeditor
|
||||
apt install -y atril
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
HOME=${1:-/etc/skel}
|
||||
|
||||
# FIXME: Rather just creating these files in tmp move the actions into the loop blow.
|
||||
LOCAL_USER_EMAIL=cyteen@ring-zero.co.uk
|
||||
|
|
|
|||
|
|
@ -2,12 +2,15 @@ apt-get install -y git-buildpackage
|
|||
|
||||
cat > ${HOME}/.gbp.conf <<EOF
|
||||
[DEFAULT]
|
||||
builder = sbuild
|
||||
pristine-tar = True
|
||||
builder = pbuilder
|
||||
#pristine-tar = True
|
||||
|
||||
[clone]
|
||||
postclone=origtargz
|
||||
|
||||
[buildpackage]
|
||||
export-dir = ../build-area
|
||||
tarball-dir = ../tarballs
|
||||
export-dir = ..
|
||||
tarball-dir = ..
|
||||
|
||||
[import-orig]
|
||||
dch = False
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@ apt install -y python-dev python3-dev
|
|||
apt install -y python3-requests
|
||||
apt install -y python3-autopep8
|
||||
apt install -y python3-ipython
|
||||
apt install -y python3-lxml
|
||||
apt install -y bpython
|
||||
apt install -y bpython3
|
||||
apt install -y python3-pylint
|
||||
apt install -y virtualenvwrapper
|
||||
#apt install -y prospector
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
machine=$(uname -m)
|
||||
if [[ ${machine} == x86_64 ]]; then
|
||||
arch=amd64
|
||||
elif
|
||||
[[ ${machine} == aarch64 ]]; then
|
||||
arch=arm64
|
||||
fi
|
||||
|
||||
UBUNTU_CODENAME=bionic
|
||||
BRANCH="-beta"
|
||||
URL="brave-browser-apt${BETA}.s3.brave.com"
|
||||
|
||||
curl -s https://${URL}/brave-core${BRANCH}.asc | apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser${BRANCH}.gpg add -
|
||||
#curl -s https://${URL}/brave-core${BRANCH}.asc | apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser${BRANCH}.gpg add -
|
||||
|
||||
#sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave4u7jddbv7cyviptqjc7jusxh72uik7zt6adtckl5f4nwy2v72qd.onion/brave-browser-archive-keyring.gpg
|
||||
|
||||
echo "deb [arch=amd64] https://${URL}/ ${UBUNTU_CODENAME} main" | tee /etc/apt/sources.list-available/brave-browser${BRANCH}-${UBUNTU_CODENAME}.list
|
||||
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
|
||||
|
||||
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=${arch}] https://${URL}/ ${UBUNTU_CODENAME} main" | tee /etc/apt/sources.list-available/brave-browser${BRANCH}-${UBUNTU_CODENAME}.list
|
||||
|
||||
ln -sf /etc/apt/sources.list-available/brave-browser-beta-${UBUNTU_CODENAME}.list /etc/apt/sources.list.d/brave-browser${BRANCH}-${UBUNTU_CODENAME}.list
|
||||
apt update
|
||||
|
|
|
|||
|
|
@ -1,13 +1,24 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/bin/ bash
|
||||
|
||||
machine=$(uname -m)
|
||||
if [[ ${machine} == x86_64 ]]; then
|
||||
arch=amd64
|
||||
elif
|
||||
[[ ${machine} == aarch64 ]]; then
|
||||
arch=arm64
|
||||
fi
|
||||
|
||||
UBUNTU_CODENAME=bionic
|
||||
BRANCH="-dev"
|
||||
URL=brave-browser-apt${BRANCH}.s3.brave.com
|
||||
|
||||
curl -s https://${URL}/brave-core${BRANCH}.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser${BRANCH}.gpg add -
|
||||
#curl -s https://${URL}/brave-core${BRANCH}.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser${BRANCH}.gpg add -
|
||||
|
||||
#sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave4u7jddbv7cyviptqjc7jusxh72uik7zt6adtckl5f4nwy2v72qd.onion/brave-browser-archive-keyring.gpg
|
||||
|
||||
echo "deb [arch=amd64] https://${URL}/ $UBUNTU_CODENAME main" | sudo tee /etc/apt/sources.list-available/brave-browser${BRANCH}-${UBUNTU_CODENAME}.list
|
||||
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
|
||||
|
||||
sudo echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=${arch}] https://${URL}/ $UBUNTU_CODENAME main" | sudo tee /etc/apt/sources.list-available/brave-browser${BRANCH}-${UBUNTU_CODENAME}.list
|
||||
|
||||
sudo ln -s /etc/apt/sources.list-available/brave-browser-dev-${UBUNTU_CODENAME}.list /etc/apt/sources.list.d/brave-browser${BRANCH}-${UBUNTU_CODENAME}.list
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
machine=$(uname -m)
|
||||
if [[ ${machine} == x86_64 ]]; then
|
||||
arch=amd64
|
||||
elif
|
||||
[[ ${machine} == aarch64 ]]; then
|
||||
arch=arm64
|
||||
fi
|
||||
|
||||
UBUNTU_CODENAME=bionic
|
||||
BRANCH="-nightly"
|
||||
URL="brave-browser-apt${BRANCH}.s3.brave.com"
|
||||
|
||||
curl -s https://${URL}/brave-core${BRANCH}.asc | apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser${BRANCH}.gpg add -
|
||||
#curl -s https://${URL}/brave-core${BRANCH}.asc | apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser${BRANCH}.gpg add -
|
||||
|
||||
#sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave4u7jddbv7cyviptqjc7jusxh72uik7zt6adtckl5f4nwy2v72qd.onion/brave-browser-archive-keyring.gpg
|
||||
|
||||
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
|
||||
|
||||
|
||||
echo "deb [arch=amd64] https://${URL}/ $UBUNTU_CODENAME main" | tee /etc/apt/sources.list-available/brave-browser${BRANCH}-${UBUNTU_CODENAME}.list
|
||||
echo "deb [[signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=${arch}] https://${URL}/ $UBUNTU_CODENAME main" | tee /etc/apt/sources.list-available/brave-browser${BRANCH}-${UBUNTU_CODENAME}.list
|
||||
|
||||
ln -s /etc/apt/sources.list-available/brave-browser${BRANCH}-${UBUNTU_CODENAME}.list /etc/apt/sources.list.d/brave-browser${BRANCH}-${UBUNTU_CODENAME}.list
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
set -x
|
||||
set -e
|
||||
|
||||
machine=$(uname -m)
|
||||
if [[ ${machine} == x86_64 ]]; then
|
||||
arch=amd64
|
||||
elif
|
||||
[[ ${machine} == aarch64 ]]; then
|
||||
arch=arm64
|
||||
fi
|
||||
|
||||
UBUNTU_CODENAME=bionic
|
||||
URL="brave-browser-apt-release.s3.brave.com"
|
||||
|
||||
curl -s https://${URL}/brave-core.asc | apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add -
|
||||
#curl -s https://${URL}/brave-core.asc | apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add -
|
||||
|
||||
echo "deb [arch=amd64] https://${URL} ${UBUNTU_CODENAME} main" | tee /etc/apt/sources.list-available/brave-browser.list
|
||||
#sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave4u7jddbv7cyviptqjc7jusxh72uik7zt6adtckl5f4nwy2v72qd.onion/brave-browser-archive-keyring.gpg
|
||||
|
||||
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
|
||||
|
||||
sudo echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=${arch}] https://${URL} ${UBUNTU_CODENAME} main" | tee /etc/apt/sources.list-available/brave-browser.list
|
||||
|
||||
ln -sf /etc/apt/sources.list-available/brave-browser.list /etc/apt/sources.list.d/brave-browser.list
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo "Docker Linux packages also include Docker Buildx when installed using the DEB or RPM packages."
|
||||
exit 0
|
||||
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
if [[ ${ARCH} == "armhf" ]]; then ARCH="arm-v7"; fi
|
||||
USER="docker"
|
||||
|
|
@ -7,20 +10,25 @@ PROJECT="buildx"
|
|||
LICENSE="apache2"
|
||||
SECTION="admin"
|
||||
HOMEPAGE="https://docs.docker.com/buildx/working-with-buildx/"
|
||||
BUILD_HOME="/var/tmp/buildx_build"
|
||||
BUILD_HOME="/var/tmp/build_docker-buildx"
|
||||
#VERSION="2.1.0"
|
||||
PACKAGE="docker-buildx"
|
||||
VERSION=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/tags?per_page=5" | jq '[ .[] | select(.name|test("v[[:digit:].]+$"))]|.[0] | .name')
|
||||
DEB_VERSION=$(echo ${VERSION} | tr -d "\"" | tr -d "v") # strip the preceding 'v'
|
||||
#VERSION="1.0.0"
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
MACHINE=$(uname -m)
|
||||
OS=$(uname -s)
|
||||
DEBEMAIL="person@company.tld"
|
||||
DEBFULLNAME="Testy McTester"
|
||||
DESCRIPTION="."
|
||||
LONG_DESCRIPTION=" ."
|
||||
|
||||
EXCLUDES="/root/.wget-hsts"
|
||||
|
||||
REQUIRES="docker-ce"
|
||||
BUILD_DIR="/var/tmp/buildx_build"
|
||||
WORKDIR="/var/tmp/buildx_build"
|
||||
BUILD_DIR="/var/tmp/build_docker-buildx"
|
||||
WORKDIR="/var/tmp/build_docker-buildx"
|
||||
|
||||
## Checkinstall variables - see defaults in /etc/checkinstallrc
|
||||
DOC_DIR=/usr/share/doc
|
||||
|
|
@ -100,6 +108,7 @@ checkinstall -y --fstrans \
|
|||
--requires=${REQUIRES} \
|
||||
--recommends=${RECOMENDS} \
|
||||
--suggests=${SUGGESTS} \
|
||||
--exclude=${EXCLUDES} \
|
||||
-D \
|
||||
bash ${BUILD_DIR}/install.sh
|
||||
FOE
|
||||
|
|
@ -122,7 +131,7 @@ DEST_DIR=/root/.docker/cli-plugins
|
|||
#mkdir -p ${DEST_DIR}
|
||||
mkdir -p /root/.docker/cli-plugins
|
||||
#wget -O ${DEST_DIR}/docker-buildx http://github.com/docker/${PROJECT}/releases/download/${VERSION}/buildx-${VERSION}.linux-${ARCH}
|
||||
wget -O /root/.docker/cli-plugins/docker-buildx http://github.com/docker/${PROJECT}/releases/download/${VERSION}/buildx-${VERSION}.linux-${ARCH}
|
||||
wget -O /root/.docker/cli-plugins/docker-buildx https://github.com/docker/${PROJECT}/releases/download/${VERSION}/buildx-${VERSION}.linux-${ARCH}
|
||||
FOE
|
||||
|
||||
bash ${BUILD_DIR}/checkinstall_it.sh
|
||||
|
|
|
|||
|
|
@ -1,24 +1,32 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
if [[ ${ARCH} == "armhf" ]]; then ARCH="arm-v7"; fi
|
||||
USER="docker"
|
||||
PROJECT="compose"
|
||||
LICENSE="mit"
|
||||
LICENSE="apache2"
|
||||
SECTION="admin"
|
||||
HOMEPAGE="https://https://docs.docker.com/compose/"
|
||||
BUILD_HOME="/var/tmp/compose_build"
|
||||
BUILD_HOME="/var/tmp/build_docker-compose"
|
||||
#VERSION="2.1.0"
|
||||
PACKAGE="docker-compose"
|
||||
VERSION=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/tags?per_page=5" | jq '[ .[] | select(.name|test("v[[:digit:].]+$"))]|.[0] | .name')
|
||||
DEB_VERSION=$(echo ${VERSION} | tr -d "\"" | tr -d "v") # strip the preceding 'v'
|
||||
#VERSION="1.0.0"
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
MACHINE=$(uname -m)
|
||||
OS=$(uname -s)
|
||||
DEBEMAIL="person@company.tld"
|
||||
DEBFULLNAME="Testy McTester"
|
||||
DESCRIPTION="."
|
||||
LONG_DESCRIPTION=" ."
|
||||
|
||||
EXCLUDES="/root/.wget-hsts"
|
||||
|
||||
REQUIRES="docker-ce"
|
||||
BUILD_DIR="/var/tmp/compose_build"
|
||||
WORKDIR="/var/tmp/compose_build"
|
||||
BUILD_DIR="/var/tmp/build_docker-compose"
|
||||
WORKDIR="/var/tmp/build_docker-compose"
|
||||
|
||||
## Checkinstall variables - see defaults in /etc/checkinstallrc
|
||||
DOC_DIR=/usr/share/doc
|
||||
|
|
@ -59,13 +67,13 @@ mkdir -p ${BUILD_DIR}/doc-pak
|
|||
|
||||
|
||||
cat > ${BUILD_DIR}/doc-pak/README << 'EOF'
|
||||
Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration. To learn more about all the features of Compose, see the list of features.
|
||||
Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your applications services. Then, with a single command, you create and start all the services from your configuration. To learn more about all the features of Compose, see the list of features.
|
||||
|
||||
Compose works in all environments: production, staging, development, testing, as well as CI workflows. You can learn more about each case in Common Use Cases.
|
||||
|
||||
Using Compose is basically a three-step process:
|
||||
|
||||
1. Define your app’s environment with a Dockerfile so it can be reproduced anywhere.
|
||||
1. Define your apps environment with a Dockerfile so it can be reproduced anywhere.
|
||||
|
||||
2. Define the services that make up your app in docker-compose.yml so they can be run together in an isolated environment.
|
||||
|
||||
|
|
@ -89,7 +97,7 @@ checkinstall -y --fstrans \
|
|||
--pkgname=${PACKAGE} \
|
||||
--pkgversion=${DEB_VERSION}\
|
||||
--pkgrelease=${RELEASE} \
|
||||
--pkgarch=amd64 \
|
||||
--pkgarch=${ARCH} \
|
||||
--pkggroup=admin \
|
||||
--pkglicense=LICENSE \
|
||||
--pkgsource=${LATEST_URL} \
|
||||
|
|
@ -97,6 +105,7 @@ checkinstall -y --fstrans \
|
|||
--requires=${REQUIRES} \
|
||||
--recommends=${RECOMENDS} \
|
||||
--suggests=${SUGGESTS} \
|
||||
--exclude=${EXCLUDES} \
|
||||
-D \
|
||||
bash ${BUILD_DIR}/install.sh
|
||||
FOE
|
||||
|
|
@ -107,7 +116,7 @@ cat > ${BUILD_DIR}/install.sh << FOE
|
|||
set -e
|
||||
#set -x
|
||||
|
||||
wget -O /usr/local/bin/docker-compose http://github.com/docker/compose/releases/download/${VERSION}/${PACKAGE}-`uname -s`-`uname -m` && chmod +x /usr/local/bin/${PACKAGE}
|
||||
wget -O /usr/local/bin/docker-compose http://github.com/docker/compose/releases/download/${VERSION}/${PACKAGE}-${OS}-${MACHINE} && chmod +x /usr/local/bin/${PACKAGE}
|
||||
|
||||
FOE
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/bash
|
||||
|
||||
DEST=${1:-/etc/skel}
|
||||
BUILD_DIR=/var/tmp/build_git-pw
|
||||
USER=getpatchwork
|
||||
PROJECT=git-pw
|
||||
RELEASE=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/releases?per_page=5" | jq -r '.[0] | .tag_name')
|
||||
|
||||
sudo apt-get install python3-requests python3-click python3-pbr \
|
||||
python3-arrow python3-tabulate python3-yaml
|
||||
|
||||
echo "mkdir -p "${BUILD_DIR}" && cd "${BUILD_DIR}" || exit "
|
||||
mkdir -p "${BUILD_DIR}" && cd "${BUILD_DIR}" || exit
|
||||
|
||||
echo "git clone -b ${RELEASE} https://github.com/${USER}/${PROJECT} ${BUILD_DIR}/${PROJECT}-${RELEASE}"
|
||||
git clone -b ${RELEASE} https://github.com/${USER}/${PROJECT} ${BUILD_DIR}/${PROJECT}-${RELEASE}
|
||||
|
||||
echo "cd ${BUILD_DIR}/${PROJECT}-${RELEASE}"
|
||||
cd ${BUILD_DIR}/${PROJECT}-${RELEASE}
|
||||
echo "git-pw is a tool for integrating Git with Patchwork, the web-based patch tracking system." > description-pak
|
||||
mkdir -p doc-pak
|
||||
|
||||
cat <<EOF | sudo tee doc-pak/README > /dev/null
|
||||
git-pw is a tool for integrating Git with Patchwork.
|
||||
|
||||
git-pw can interact with individual patches, complete patch series, and customized bundles. The three major subcommands are patch, bundle, and series.
|
||||
|
||||
The git-pw utility is a wrapper which makes REST calls to the Patchwork service. To use git-pw, you must set up your environment by configuring your Patchwork server URL and either an API token or a username and password. To configure the server URL, run:
|
||||
|
||||
git config pw.server 'https://patchwork.kernel.org/api/1.2'
|
||||
git config pw.project 'linux-rockchip'
|
||||
#git config pw.token ''
|
||||
#git config pw.password ''
|
||||
#git config pw.states ''
|
||||
|
||||
git-pw --help
|
||||
|
||||
See: https://patchwork.readthedocs.io/projects/git-pw/en/latest/usage/
|
||||
EOF
|
||||
|
||||
#sudo checkinstall -y --fstrans=no pip3 install --user .
|
||||
sudo checkinstall -y --fstrans=no sudo python setup.py install
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ if [ -e /usr/bin/grc ]; then
|
|||
alias iptables="cl iptables"
|
||||
alias iwconfig="cl iwconfig"
|
||||
alias lspci="cl lspci"
|
||||
alias lsblk="cl lsblc"
|
||||
alias lsblk="cl lsblk"
|
||||
alias blkid="cl blkid"
|
||||
alias showmount="cl showmount"
|
||||
alias tcpdump="cl tcpdump"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
# ref: vim plugins added to 020_vim.sh
|
||||
#
|
||||
# .vimrc
|
||||
#" 80 characters line
|
||||
#set colorcolumn=81
|
||||
#"execute "set colorcolumn=" . join(range(81,335), ',')
|
||||
#highlight ColorColumn ctermbg=Black ctermfg=DarkRed
|
||||
|
||||
#" Highlight trailing spaces
|
||||
#" http://vim.wikia.com/wiki/Highlight_unwanted_spaces
|
||||
#highlight ExtraWhitespace ctermbg=red guibg=red
|
||||
#match ExtraWhitespace /\s\+$/
|
||||
#autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
|
||||
#autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
|
||||
#autocmd InsertLeave * match ExtraWhitespace /\s\+$/
|
||||
#autocmd BufWinLeave * call clearmatches()
|
||||
#
|
||||
#Plugin 'joe-skb7/cscope-map'
|
||||
#Plugin 'bogado/file-line'
|
||||
#Plugin 'majutsushi/tagbar'
|
||||
|
||||
# https://stackoverflow.com/questions/33676829/vim-configuration-for-linux-kernel-development
|
||||
|
||||
# cscope: will be used to navigate the code (switch between functions, etc.).
|
||||
# ctags: needed for Tagbar plugin and for Omni completion
|
||||
apt install \
|
||||
cscope \
|
||||
universal-ctags
|
||||
|
|
@ -1,10 +1,11 @@
|
|||
sudo apt install -y \
|
||||
qemu-kvm \
|
||||
libvirt-clients \
|
||||
libvirt-daemon \
|
||||
libvirt-daemon-system \
|
||||
libvirt-daemon-driver-storage-zfs \
|
||||
bridge-utils \
|
||||
virtinst \
|
||||
libvirt-daemon \
|
||||
virt-manager
|
||||
|
||||
sudo virsh net-list --all
|
||||
|
|
|
|||
|
|
@ -0,0 +1,92 @@
|
|||
# https://www.runeaudio.com/forum/crossfeed-playback-for-more-realistic-headphone-audio-t2878.html#p9950
|
||||
|
||||
sudo apt-get install bs2b-ladspa
|
||||
|
||||
|
||||
# This is what I add to /etc/mpd.conf
|
||||
cat <<EOF | sudo tee -a /etc/mpd.conf >/dev/null
|
||||
audio_output {
|
||||
type "alsa"
|
||||
name "ALSA default"
|
||||
device "hw:0,0"
|
||||
dsd_usb "yes"
|
||||
}
|
||||
#
|
||||
audio_output {
|
||||
type "alsa"
|
||||
name "ALSA crossfeed"
|
||||
device "crossfeed"
|
||||
dsd_usb "yes"
|
||||
}
|
||||
EOF
|
||||
|
||||
|
||||
# And this is the /etc/asound.conf
|
||||
cat <<EOF | sudo tee -a /etc/asound.conf >/dev/null
|
||||
pcm.!default "crossfeed"
|
||||
ctl.!default "crossfeed"
|
||||
|
||||
pcm.soundcard { type hw; card 0; device 0; }
|
||||
pcm.plugSoundcard { type plug; slave.pcm "soundcard"; }
|
||||
|
||||
pcm.bs2b {
|
||||
type ladspa
|
||||
slave.pcm "plugSoundcard"
|
||||
path "/usr/lib/ladspa" #path under arch linux will be an other ?
|
||||
playback_plugins [ {
|
||||
label bs2b
|
||||
input {
|
||||
controls [650 9.5]
|
||||
}
|
||||
} ]
|
||||
}
|
||||
|
||||
pcm.crossfeed { type plug; slave.pcm "bs2b"; }
|
||||
ctl.crossfeed { type hw; card 0; }
|
||||
EOF
|
||||
|
||||
# parameters in "controls [x x]" can be changed.
|
||||
# Here are some configurations of HZ and dB for Crossfeed:
|
||||
# source: http://bs2b.sourceforge.net/
|
||||
|
||||
# These results shows a three versions with different sets of cut-off frequency
|
||||
# and crossfeed level:
|
||||
# 1) 700 Hz, 4.5 dB - default.
|
||||
# This setting is closest to the virtual speaker placement with azimuth 30
|
||||
# degrees and the removal of about 3 meters, while listening by headphones.
|
||||
# 2) 700 Hz, 6 dB - most popular.
|
||||
# This setting is close to the parameters of a Chu Moy's [3] crossfeeder.
|
||||
# 3) 650 Hz, 9.5 dB - making the smallest changes in the original signal
|
||||
# only for relaxing listening by headphones.
|
||||
# This setting is close to the parameters of a crossfeeder implemented in Jan Meier's [4] CORDA amplifiers.
|
||||
|
||||
# Change of output is possible with:
|
||||
# mpc disable 1
|
||||
# mpc enable 2
|
||||
|
||||
# output of "aplay -L"
|
||||
|
||||
# null
|
||||
# Discard all samples (playback) or generate zero samples (capture)
|
||||
# plugSoundcard
|
||||
# bs2b
|
||||
# crossfeed
|
||||
# sysdefault:CARD=sndrpihifiberry
|
||||
# snd_rpi_hifiberry_dac,
|
||||
# Default Audio Device
|
||||
# dmix:CARD=sndrpihifiberry,DEV=0
|
||||
# snd_rpi_hifiberry_dac,
|
||||
# Direct sample mixing device
|
||||
# dsnoop:CARD=sndrpihifiberry,DEV=0
|
||||
# snd_rpi_hifiberry_dac,
|
||||
# Direct sample snooping device
|
||||
# hw:CARD=sndrpihifiberry,DEV=0
|
||||
# snd_rpi_hifiberry_dac,
|
||||
# Direct hardware device without any conversions
|
||||
# plughw:CARD=sndrpihifiberry,DEV=0
|
||||
# snd_rpi_hifiberry_dac,
|
||||
# Hardware device with all software conversions
|
||||
|
||||
# Interesting is "top":
|
||||
# crossfeed disabled 12%
|
||||
# crossfeed enabled 19%
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/bin/bash
|
||||
|
||||
echo "FIXME"
|
||||
exit()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
sudo apt install mpd mpc mpd-sima ario
|
||||
|
||||
bash /var/tmp/automate/020_ladspa.sh
|
||||
|
|
@ -8,11 +8,11 @@
|
|||
|
||||
apt install -y afew # provides /usr/bin/afew
|
||||
|
||||
|
||||
mkdir -p /etc/skel/.config/afew/
|
||||
DEST=${1:-/etc/skel}
|
||||
|
||||
# Put a list of filters into ~/.config/afew/config :
|
||||
cat > /etc/skel/.config/afew/config <<'EOF'
|
||||
mkdir -p ${DEST}/.config/afew
|
||||
cat > ${DEST}/.config/afew/config <<'EOF'
|
||||
# This is the default filter chain
|
||||
[SpamFilter]
|
||||
[KillThreadsFilter]
|
||||
|
|
@ -31,7 +31,7 @@ sed -i '/\[new\]/{n;s/.*/tags=new\;/}' .notmuch-config
|
|||
|
||||
# After running notmuch new, all new messages will be marked new. You can then do various tag post-processing by just acting on messages with that tag.
|
||||
|
||||
MAILDIR="/etc/skel/.local/share/mail" # set by mutt-wizard setup
|
||||
MAILDIR="${DEST}/.local/share/mail" # set by mutt-wizard setup
|
||||
|
||||
# And create a post-new hook for notmuch.
|
||||
mkdir -p ${MAILDIR}/.notmuch/hooks
|
||||
|
|
@ -51,6 +51,7 @@ notmuch tag +inbox +unread -new -- tag:new
|
|||
EOF
|
||||
|
||||
# Note: the queries do not generally include tag:new because this is implied when afew is run with the –new flag.
|
||||
mkdir -p ${MAILDIR_PATH}/.notmuch/hooks
|
||||
cat > ${MAILDIR_PATH}/.notmuch/hooks/post-new.afew.example <<EOF
|
||||
[ArchiveSentMailsFilter]
|
||||
|
||||
|
|
@ -68,6 +69,7 @@ tags = +notmuch
|
|||
|
||||
EOF
|
||||
|
||||
mkdir -p ${MAILDIR_PATH}/.notmuch/hooks
|
||||
cat > ${MAILDIR_PATH}/.notmuch/hooks/post-new <<'EOF'
|
||||
!/bin/sh
|
||||
/usr/bin/afew --tag --new
|
||||
|
|
@ -75,7 +77,7 @@ EOF
|
|||
|
||||
|
||||
#---------------------------------------------------------------------
|
||||
cat > /etc/skel/.config/afew/afew.config-example <<'EOF'
|
||||
cat > ${DEST}/.config/afew/afew.config-example <<'EOF'
|
||||
# global configuration
|
||||
[global]
|
||||
|
||||
|
|
|
|||
|
|
@ -7,10 +7,11 @@
|
|||
|
||||
apt install -y notmuch-mutt
|
||||
|
||||
DEST=${1:-/etc/skel}
|
||||
NEOMUTTCONF="${DEST}/.config/mutt"
|
||||
MAILDIR="${DEST}/.local/share/mail" # set by mutt-wizard setup
|
||||
|
||||
NEOMUTTCONF="/etc/skel/.config/mutt/"
|
||||
MAILDIR='/etc/skel/.local/share/mail' # set by mutt-wizard setup
|
||||
|
||||
mkdir -p ${NEOMUTTCONF}
|
||||
cat >> ${NEOMUTTCONF}/muttrc <<'EOF'
|
||||
# notmuch
|
||||
set nm_default_uri = "notmuch:///$HOME/.local/share/mail"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ apt install -y software-properties-common
|
|||
apt install -y neovim
|
||||
|
||||
# Need to backport from sid
|
||||
apt install -y #python-neovim python3-neovim
|
||||
# apt install -y python-neovim python3-neovim
|
||||
|
||||
# python-neovim if notavailableasapackage
|
||||
#pip2 install --user --upgrade neovim
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
|
||||
PROJECT=evilsocket/opensnitch
|
||||
RELEASE=$(curl -s https://api.github.com/repos/${PROJECT}/releases/latest | grep tarball_url | cut -d '"' -f 4 | awk -F "/" {'print $8'})
|
||||
|
||||
WORKDIR=/var/tmp/build_opensnitch
|
||||
mkdir -p ${WORKDIR} && cd ${WORKDIR}
|
||||
|
||||
REPO=git://git@github.com/evilsocket/opensnitch.git
|
||||
REPO=https://github.com/evilsocket/opensnitch.git
|
||||
echo "Release verion is: ${RELEASE}"
|
||||
#git clone -b ${RELEASE} ${REPO}
|
||||
#git clone --no-checkout -o upstream ${REPO}
|
||||
gbp clone ${REPO}
|
||||
cd opensnitch
|
||||
git checkout -b ${RELEASE}
|
||||
gbp export-orig
|
||||
|
||||
DIST=$(lsb_release --short --codename)
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
#DIST=ascii ARCH=amd64 git-pbuilder create
|
||||
DIST=${DIST} ARCH=${ARCH} git-pbuilder update
|
||||
|
||||
gbp buildpackage \
|
||||
--git-pbuilder \
|
||||
--git-arch=${ARCH} \
|
||||
--git-dist=${DIST} \
|
||||
--git-upstream-tree=TAG \
|
||||
--git-upstream-tag='v%(version)s' \
|
||||
--git-ignore-branch
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
sudo apt install -y psensor psensor-server
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
#!/bin/bash
|
||||
|
||||
DEST=${1:-/etc/skel}
|
||||
BUILD_DIR=/var/tmp/build_pwclient
|
||||
USER=getpatchwork
|
||||
PROJECT=pwclient
|
||||
RELEASE="1.0"
|
||||
|
||||
sudo apt-get install python3-pbr
|
||||
|
||||
mkdir -p "${BUILD_DIR}" && cd "${BUILD_DIR}" || exit
|
||||
git clone https://github.com/${USER}/${PROJECT} ${BUILD_DIR}/${PROJECT}-${RELEASE}
|
||||
cd ${PROJECT}-${RELEASE}
|
||||
echo "pwclient is a VCS-agnostic tool for interacting with Patchwork, the web-based patch tracking system." > description-pak
|
||||
mkdir -p doc-pak
|
||||
|
||||
cat <<EOF | sudo tee doc-pak/README > /dev/null
|
||||
pwclient reads configuration from the .pwclientrc file, located in your home directory ($HOME or ~). Patchwork itself provides sample .pwclientrc files for projects at:
|
||||
|
||||
/project/{projectName}/pwclientrc/
|
||||
|
||||
[options]
|
||||
default=netdevbpf
|
||||
|
||||
[linux-wireless]
|
||||
url = https://patchwork.kernel.org/xmlrpc/
|
||||
|
||||
[netdevbpf]
|
||||
url = https://patchwork.kernel.org/xmlrpc/
|
||||
|
||||
[linux-rockchip]
|
||||
url: https://patchwork.kernel.org/xmlrpc/
|
||||
project: linux-rockchip
|
||||
|
||||
EOF
|
||||
|
||||
#sudo checkinstall -y --fstrans=no pip3 install --user .
|
||||
sudo checkinstall -y --fstrans=no sudo python setup.py install
|
||||
|
||||
|
||||
|
||||
cat <<EOF | sudo tee ${DEST}/.pwclientrc > /dev/null
|
||||
[options]
|
||||
default=base
|
||||
|
||||
#[patchwork]
|
||||
#url = https://patchwork.ozlabs.org/xmlrpc/
|
||||
|
||||
# http://lists.infradead.org/mailman/listinfo/linux-rockchip
|
||||
[base]
|
||||
url: https://patchwork.kernel.org/xmlrpc/
|
||||
project: linux-rockchip
|
||||
EOF
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
#!/bin/bash
|
||||
|
||||
DEST=${1:-/etc/skel}
|
||||
USER=PyCQA
|
||||
PROJECT=prospector
|
||||
BUILD_DIR=/var/tmp/build-${PROJECT}
|
||||
RELEASE=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/releases/latest" | jq -r '.tag_name')
|
||||
|
||||
spt-cache udo apt-get install python3-requests python3-click python3-pbr \
|
||||
python3-arrow python3-tabulate python3-yaml
|
||||
|
||||
echo "mkdir -p "${BUILD_DIR}" && cd "${BUILD_DIR}" || exit "
|
||||
mkdir -p "${BUILD_DIR}" && cd "${BUILD_DIR}" || exit
|
||||
|
||||
#echo "git clone -b ${RELEASE} https://github.com/${USER}/${PROJECT} ${BUILD_DIR}/${PROJECT}-${RELEASE}"
|
||||
#git clone -b ${RELEASE} https://github.com/${USER}/${PROJECT} ${BUILD_DIR}/${PROJECT}-${RELEASE}
|
||||
mkdir ${BUILD_DIR}/${PROJECT}-${RELEASE}
|
||||
|
||||
echo "cd ${BUILD_DIR}/${PROJECT}-${RELEASE}"
|
||||
cd ${BUILD_DIR}/${PROJECT}-${RELEASE}
|
||||
echo "Prospector is a tool to analyse Python code and output information about errors, potential problems, convention violations and complexity." > description-pak
|
||||
mkdir -p doc-pak
|
||||
|
||||
cat <<EOF | sudo tee doc-pak/README > /dev/null
|
||||
Prospector provides some default profiles, to provide a starting point and adapts the output depending on the libraries your project uses.
|
||||
|
||||
Prospector currently supports 12 tools, of which 7 are defaults and 5 are optional extras.
|
||||
|
||||
|
||||
Defaults
|
||||
|
||||
Pylint
|
||||
Pylint is the most comprehensive static analysis tool for Python. It is extremely thorough and is the source of most messages that prospector outputs.
|
||||
|
||||
pycodestyle
|
||||
pycodestyle is a simple tool to warn about violations of the PEP8 style guide. It produces messages for any divergence from the style guide.
|
||||
|
||||
Prospector’s concept of strictness turns off various warnings depending on the strictness level. By default, several PEP8 errors will be suppressed. To adjust this without adjusting the strictness of other tools, you have some options:
|
||||
|
||||
# turn off pep8 checking completely:
|
||||
prospector --no-style-warnings
|
||||
|
||||
# turn on complete pep8 checking:
|
||||
prospector --full-pep8
|
||||
|
||||
# change the maximum line length allowed
|
||||
# (the default varies by strictness):
|
||||
prospector --max-line-length 120
|
||||
|
||||
Pyflakes
|
||||
Pyflakes analyzes programs and detects various errors. It is simpler and faster than pylint, but also not as thorough.
|
||||
|
||||
Mccabe
|
||||
McCabe or cyclomatic complexity is a measurement of how many paths there are in a given function or method. It measures how complicated your functions are, and warns if they reach a certain threshold. Methods that are too complex are prone to logic errors, and should be refactored to a series of smaller methods.
|
||||
|
||||
Dodgy
|
||||
Dodgy is a very simple tool designed to find ‘dodgy’ things which should not be in a public project, such as secret keys, passwords, AWS tokens or source control diffs.
|
||||
|
||||
Pydocstyle
|
||||
Pydocstyle is a simple tool to warn about violations of the PEP257 Docstring Conventions. It produces messages for any divergence from the style guide.
|
||||
|
||||
This tool is currently considered experimental due to some bugs in its ability to parse code. For example, modules that contain an __all__ could end up producing bogus error messages if the __all__ isn’t formatted exactly as pydocstyle expects it.
|
||||
|
||||
It will not run by default, and must be enabled explicitly (via --with-tool pep257 or in a profile) or implicitly (using the --doc-warnings flag).
|
||||
|
||||
Profile-validator
|
||||
This is a simple tool built in to prospector which validates prospector profiles.
|
||||
|
||||
|
||||
Optional Extras
|
||||
|
||||
These extras are integrated into prospector but are not activated by default. This is because their output is not necessarily useful for all projects.
|
||||
|
||||
They are also not installed by default. The instructions for installing each tool is in the tool section below. For more detailed information on installing, see install section.
|
||||
|
||||
Pyroma
|
||||
Pyroma is a tool to check your setup.py to ensure it is following best practices of the Python packaging ecosystem. It will warn you if you are missing any package metadata which would improve the quality of your package. This is recommended if you intend to publish your code on PyPI.
|
||||
|
||||
|
||||
Vulture
|
||||
Vulture finds unused classes, functions and variables in your code. This could be useful if your project is an application rather than a library, however, if you do a lot of dynamic access or metaprogramming, Vulture will likely warn about unused code that is in fact used.
|
||||
|
||||
Frosted
|
||||
Frosted is a fork of pyflakes which was created with the intention of taking over from and extending pyflakes as development had slowed. Since Prospector was originally created, pyflakes development has started up again and frosted has stagnated, so it has been demoted to be an optional extra.
|
||||
|
||||
Mypy
|
||||
Mypy is an experimental optional static type checker for Python that aims to combine the benefits of dynamic (or “duck”) typing and static typing. Mypy combines the expressive power and convenience of Python with a powerful type system and compile-time type checking.
|
||||
|
||||
Bandit
|
||||
Bandit finds common security issues in Python code.
|
||||
|
||||
|
||||
|
||||
See: https://prospector.readthedocs.io/#usage
|
||||
EOF
|
||||
|
||||
#sudo checkinstall -y --fstrans=no pip3 install --user .
|
||||
sudo checkinstall -y --fstrans=no sudo pip3 install prospector\[with_everything\]==${RELEASE}
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
apt install -y python3-requests python3-lxml python3-cssselect feh
|
||||
|
|
@ -1,4 +1,21 @@
|
|||
sudo apt-get install -y qemu-utils qemu-efi-aarch64 qemu-system-arm
|
||||
sudo apt-get install -y qemu-utils qemu-efi-aarch64 qemu-system-arm qemu-system-gui cpu-checker virt-manager
|
||||
|
||||
|
||||
KVM_USER_GROUP=kvm
|
||||
|
||||
cat <<EOF | tee /etc/polkit-1/rules.d/50-libvirt.rules > /dev/null
|
||||
/* Allow users in ${KVM_USER_GROUP} group to manage the libvirt
|
||||
daemon without authentication */
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.libvirt.unix.manage" &&
|
||||
subject.isInGroup("${KVM_USER_GROUP}")) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
EOF
|
||||
|
||||
sudo usermod -aG kvm ${USER}
|
||||
sudo usermod -aG libvirt ${USER}
|
||||
sudo usermod -aG libvirt-qemu ${USER}
|
||||
|
||||
echo "options kvm-intel nested=1" | sudo tee /etc/modprobe.d/kvm-intel.conf
|
||||
|
|
|
|||
|
|
@ -1,9 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
apt install -y redshift
|
||||
sudo apt install -y redshift redshift-gtk #geoclue-2.0
|
||||
|
||||
/usr/bin/xfconf-query -c xfce4-session -p /startup/redshift/enabled -n -t bool -s true
|
||||
|
||||
cat > ~/.config/redshift.conf << 'EOF'
|
||||
DEST=${1:-/etc/skel}
|
||||
|
||||
#cat <<EOF | sudo tee -a /etc/geoclue/geoclue.conf >/dev/null
|
||||
#
|
||||
#[redshift]
|
||||
#allowed=true
|
||||
#system=false
|
||||
#users=
|
||||
#EOF
|
||||
|
||||
cat > ${DEST}/.config/redshift.conf << 'EOF'
|
||||
; Global settings for redshift
|
||||
[redshift]
|
||||
; Set the day and night screen temperatures
|
||||
|
|
@ -62,5 +72,5 @@ lon=-4.702148
|
|||
screen=0
|
||||
EOF
|
||||
|
||||
sed -i 's,^\(lat=\).*,\1'52.258744',' ~/.config/redshift.conf
|
||||
sed -i 's,^\(lon=\).*,\1'-4.702148',' ~/.config/redshift.conf
|
||||
sed -i 's,^\(lat=\).*,\1'52.258744',' ${DEST}/.config/redshift.conf
|
||||
sed -i 's,^\(lon=\).*,\1'-4.702148',' ${DEST}/.config/redshift.conf
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Brings in the qt5 gui for tesseract and one language (english)
|
||||
# the gnome version crashes on the batch configuration screen.
|
||||
sudo apt install gimagereader-qt5 tesseract-ocr
|
||||
35
020_tmux.sh
35
020_tmux.sh
|
|
@ -26,9 +26,7 @@ cat <<EOF | sudo tee -a "${DEST}"/.profile
|
|||
|
||||
if command -v tmux>/dev/null; then
|
||||
if [[ -z "$TMUX" ]]; then
|
||||
if tmux has-session 2>/dev/null; then
|
||||
exec tmux attach
|
||||
elif [[ -f ${PWD}/.tmuxp.yml ]] && [[ command -v tmuxp>/dev/null ]];then
|
||||
if [ -f ${PWD}/.tmuxp.yml ] && [ command -v tmuxp>/dev/null ]; then
|
||||
exec tmuxp load .
|
||||
else
|
||||
exec tmux
|
||||
|
|
@ -175,35 +173,34 @@ unbind r
|
|||
bind r source-file ~/.tmux.conf \; display "Reloaded!"
|
||||
|
||||
# I dont know what I'm doing
|
||||
unbind {
|
||||
unbind }
|
||||
bind H swap-pane -U
|
||||
bind L swap-pane -D
|
||||
#unbind {
|
||||
#unbind }
|
||||
#bind H swap-pane -U
|
||||
#bind L swap-pane -D
|
||||
|
||||
# highlight navbar indication of current window
|
||||
set-window-option -g window-status-current-fg colour235
|
||||
set-window-option -g window-status-current-bg colour148 #064 blendin
|
||||
set-window-option -g window-status-fg white
|
||||
# set-window-option -g window-status-attr bold
|
||||
# set-window-option -g window-status-current-attr bold
|
||||
set-window-option -g window-status-current-style fg=colour235
|
||||
set-window-option -g window-status-current-style bg=colour148 #064 blendin
|
||||
set-window-option -g window-status-style fg=white
|
||||
# set-window-option -g window-status-style attr=bold
|
||||
# set-window-option -g window-status-current-style attr=bold
|
||||
|
||||
# highlight window when it has new activity
|
||||
setw -g monitor-activity on
|
||||
set -g visual-activity off
|
||||
set-option -g window-status-activity-bg white
|
||||
set-option -g window-status-activity-fg colour235
|
||||
set-option -g window-status-activity-style bg=white
|
||||
set-option -g window-status-activity-style fg=colour235
|
||||
|
||||
# color navbar
|
||||
set -g status-bg colour235
|
||||
|
||||
# set color window borders
|
||||
set -g pane-border-fg colour148
|
||||
set -g pane-active-border-fg colour069 # 24 blue
|
||||
# set -g pane-border-bg black
|
||||
# set -g pane-active-border-bg black
|
||||
set -g pane-border-style fg=colour148
|
||||
set -g pane-active-border-style fg=colour069 # 24 blue
|
||||
# set -g pane-border-style bg=black
|
||||
# set -g pane-active-border-style bg=black
|
||||
EOF
|
||||
|
||||
|
||||
mkdir -p "${DEST}"/.tmux/plugins/tpm
|
||||
mkdir -p "${DEST}"/.tmuxp
|
||||
|
||||
|
|
|
|||
29
020_vim.sh
29
020_vim.sh
|
|
@ -169,8 +169,13 @@ EOF
|
|||
|
||||
cd ${DEST} || exit
|
||||
sudo apt install -y git
|
||||
|
||||
# a vi plugin that doesn't install with Vundle
|
||||
git clone https://github.com/joe-skb7/cscope-maps.git ${DEST}vim/bundle/cscope-maps
|
||||
|
||||
git clone http://github.com/VundleVim/Vundle.vim.git ${DEST}/.vim/bundle/Vundle.vim
|
||||
|
||||
|
||||
# Prepend to the .vimrc
|
||||
if [ -f ${DEST}/.vimrc_pending ];then
|
||||
rm ${DEST}/.vimrc_pending
|
||||
|
|
@ -228,6 +233,12 @@ Plugin 'edkolev/tmuxline.vim'
|
|||
Plugin 'tmux-plugins/vim-tmux'
|
||||
Plugin 'christoomey/vim-tmux-navigator'
|
||||
|
||||
" C related
|
||||
" cscope key mapping: https://github.com/joe-skb7/cscope-maps/blob/master/plugin/cscope_maps.vim#L52
|
||||
"Plugin 'joe-skb7/cscope-map' " See git clone above
|
||||
Plugin 'bogado/file-line'
|
||||
Plugin 'rickhowe/diffchar.vim'
|
||||
|
||||
" vim-snipmate
|
||||
Plugin 'MarcWeber/vim-addon-mw-utils'
|
||||
Plugin 'tomtom/tlib_vim'
|
||||
|
|
@ -255,6 +266,8 @@ Plugin 'tsony-tsonev/nerdtree-git-plugin'
|
|||
Plugin 'jistr/vim-nerdtree-tabs'
|
||||
Plugin 'severin-lemaignan/vim-minimap'
|
||||
|
||||
nmap <F8> :TagbarToggle<CR>
|
||||
|
||||
" Always use the same virtualenv for vim, regardless of what Python
|
||||
" environment is loaded in the shell from which vim is launched
|
||||
let g:vim_virtualenv_path = "${HOME}/jupyter_virtualenv/"
|
||||
|
|
@ -307,6 +320,20 @@ autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in
|
|||
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |
|
||||
\ quit | endif
|
||||
|
||||
" 80 characters line
|
||||
set colorcolumn=81
|
||||
"execute "set colorcolumn=" . join(range(81,335), ',')
|
||||
highlight ColorColumn ctermbg=Black ctermfg=DarkRed
|
||||
|
||||
" Highlight trailing spaces
|
||||
" http://vim.wikia.com/wiki/Highlight_unwanted_spaces
|
||||
highlight ExtraWhitespace ctermbg=red guibg=red
|
||||
match ExtraWhitespace /\s\+$/
|
||||
autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
|
||||
autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
|
||||
autocmd InsertLeave * match ExtraWhitespace /\s\+$/
|
||||
autocmd BufWinLeave * call clearmatches()
|
||||
|
||||
Plugin 'godlygeek/tabular'
|
||||
Plugin 'plasticboy/vim-markdown'
|
||||
|
||||
|
|
@ -646,7 +673,7 @@ yarn build
|
|||
mkdir -p ${HOME}/.config/coc
|
||||
|
||||
# Install YouCompleteMe support
|
||||
sudo apt install -y build-essential cmake exuberant-ctags
|
||||
sudo apt install -y build-essential cmake universal-ctags
|
||||
sudo apt install -y python3-dev python3-dev
|
||||
|
||||
# semantic support for C-family
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ RELEASE_NAME=Debian_11 # bullseye
|
|||
|
||||
mkdir -p /etc/apt//sources.list-available || exit
|
||||
cat <<EOF | sudo tee /etc/apt/sources.list-available/waterfox.list >/dev/null
|
||||
# wget -nv https://download.opensuse.org/repositories/home:hawkeye116477:waterfox/${RELEASE_NAME}/Release.key -O Release.key
|
||||
# apt-key add - < Release.key
|
||||
# curl -fsSL https://download.opensuse.org/repositories/home:hawkeye116477:waterfox/${RELEASE_NAME}/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_hawkeye116477_waterfox.gpg > /dev/null
|
||||
|
||||
deb http://download.opensuse.org/repositories/home:/hawkeye116477:/waterfox/${RELEASE_NAME}/ /
|
||||
EOF
|
||||
|
||||
|
|
@ -22,8 +22,7 @@ EOF
|
|||
|
||||
sudo ln -sf /etc/apt/sources.list-available/waterfox.list /etc/apt/sources.list.d/waterfox.list
|
||||
|
||||
wget -nv https://download.opensuse.org/repositories/home:hawkeye116477:waterfox/${RELEASE_NAME}/Release.key -O /tmp/Release.key
|
||||
sudo apt-key add - < /tmp/Release.key
|
||||
curl -fsSL https://download.opensuse.org/repositories/home:hawkeye116477:waterfox/${RELEASE_NAME}/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home_hawkeye116477_waterfox.gpg > /dev/null
|
||||
|
||||
sudo apt update
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
DEST=${1:-/etc/skel}
|
||||
ALIAS_DIR=".zshrc.d"
|
||||
mkdir -p ${DEST}/${ALIAS_DIR}
|
||||
|
||||
# https://github.com/webtorrent/webtorrent-cli
|
||||
npm install --global webtorrent-cli
|
||||
|
||||
# https://github.com/mafintosh/peerflix
|
||||
npm install --global peerflix
|
||||
|
||||
# https://github.com/AnthonyBloomer/ezflix
|
||||
pip install ezflix
|
||||
|
||||
ALIAS_FILE=${DEST}/${ALIAS_DIR}/003_local.sh
|
||||
cat <<EOF | sudo tee -a ${ALIAS_FILE} >/dev/null
|
||||
alias wtmpv='webtorrent --mpv --blocklist https://dbl.oisd.nl/ --upload-limit 20 --subtitiles'
|
||||
alias peerflix='peerflix --blocklist https://dbl.oisd.nl/ --mpv --subtitles --remove'
|
||||
EOF
|
||||
|
|
@ -136,10 +136,12 @@ alias wipe='ionice -c3 /usr/bin/wipe -l1 -v -r'
|
|||
alias less="less -R"
|
||||
alias youtube-dl='youtube-dl --external-downloader=aria2c'
|
||||
alias tsmpv='torsocks mpv'
|
||||
alias wtmpv='torsocks webtorrent --mpv'
|
||||
alias wtmpv='webtorrent --mpv --blocklist https://dbl.oisd.nl/ --upload-limit 20'
|
||||
alias tsyoutube-dl='torsocks youtube-dl'
|
||||
alias tsleech='torsocks leech'
|
||||
alias tswget='torsocks wget'
|
||||
alias pastebinit='pastebinit -b paste.debian.net'
|
||||
alias tspastebinit='torsocks pastebinit -b paste.debian.net'
|
||||
EOF
|
||||
|
||||
ALIAS_FILE=${DEST}/${ALIAS_DIR}/003_lsd.sh
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
set -x
|
||||
set -Eeu -o -pipefail
|
||||
## Completions for Debian 9.0 - may be included in zgen
|
||||
#
|
||||
#sudo bash -c "cat > /etc/apt/sources.list.d/shells:zsh-users:zsh-completions.list" << 'EOF'
|
||||
|
|
@ -11,7 +12,7 @@ set -x
|
|||
#sudo apt update
|
||||
#sudo apt install zsh-completions
|
||||
|
||||
sudo apt install -y zsh nodejs zsh-theme-powerlevel9k git fonts-powerline powerline
|
||||
sudo apt install -y zsh nodejs zsh-theme-powerlevel9k git fonts-powerline powerline fzf
|
||||
|
||||
# compaudit
|
||||
# There are insecure directories: /usr/local/share/zsh/site-functions
|
||||
|
|
@ -27,6 +28,7 @@ HOME="${DEST}"
|
|||
ALIAS_DIR=".zshrc.d"
|
||||
|
||||
cd "${DEST}" || exit
|
||||
cp /var/tmp/automate/.p10k.zsh ${DEST}
|
||||
chsh -s "$(which zsh)" "${USER}"
|
||||
|
||||
|
||||
|
|
@ -34,7 +36,6 @@ chsh -s "$(which zsh)" "${USER}"
|
|||
# .zgen-setup pulls zgenom automatically and puts it in .zqs-zgenom, plugins in .zgenom
|
||||
git clone http://github.com/unixorn/zsh-quickstart-kit "${DEST}"/zsh-quickstart-kit
|
||||
|
||||
|
||||
ln -rsf "${DEST}"/zsh-quickstart-kit/zsh/.zshrc "${DEST}"/.zshrc
|
||||
ln -rsf "${DEST}"/zsh-quickstart-kit/zsh/.zsh_functions "${DEST}"/.zsh_functions
|
||||
ln -rsf "${DEST}"/zsh-quickstart-kit/zsh/.zsh_aliases "${DEST}"/.zsh_aliases
|
||||
|
|
@ -49,7 +50,7 @@ echo "setopt PROMPT_SUBST" >> "${DEST}"/.zshrc
|
|||
|
||||
echo "NVIM_PYTHON_LOG_FILE=/var/tmp/nvim_python.log" >> "${DEST}"/"${ALIAS_DIR}"/008_nvim.zsh
|
||||
echo "NVIM_PYTHON_LOG_LEVEL=DEBUG" >> "${DEST}"/"${ALIAS_DIR}"/008_nvim.zsh
|
||||
touch /var/tmp/nvim_python.log
|
||||
sudo touch /var/tmp/nvim_python.log
|
||||
|
||||
# fix path error in .zshrc
|
||||
#sed -i 's|pushd $(dirname "${HOME}/$(readlink "${DEST}"/.zshrc)")|pushd $(dirname "$(readlink "${DEST}"/.zshrc)")|' "${DEST}"/zsh-quickstart-kit/zsh/.zshrc
|
||||
|
|
@ -184,8 +185,8 @@ cat > "${DEST}"/.zgen-local-plugins << 'EOF'
|
|||
# Docker completion
|
||||
# zgenom load srijanshetty/docker-zsh
|
||||
#zgenom load akarzim/zsh-docker-aliases
|
||||
zgenom load robbyrussell/oh-my-zsh plugins/docker
|
||||
zgenom load robbyrussell/oh-my-zsh plugins/docker-compose
|
||||
#zgenom load robbyrussell/oh-my-zsh plugins/docker
|
||||
#zgenom load robbyrussell/oh-my-zsh plugins/docker-compose
|
||||
|
||||
# Load me last
|
||||
GENCOMPL_FPATH=$HOME/.zsh/complete
|
||||
|
|
@ -243,7 +244,7 @@ echo 'zgenom autoupdate' > "${DEST}"/"${ALIAS_DIR}"/001_zgenom-refresh.zsh
|
|||
echo 'powerline-daemon -q' > "${DEST}"/"${ALIAS_DIR}"/006_powerline-daemon.zsh
|
||||
|
||||
|
||||
sed -i 's,^\(CHARMAP=\).*,\1'\"UTF-8\"',' /etc/default/console-setup
|
||||
sudo sed -i 's,^\(CHARMAP=\).*,\1'\"UTF-8\"',' /etc/default/console-setup
|
||||
|
||||
# set theme for zsh
|
||||
cat > "${DEST}"/"${ALIAS_DIR}"/002_theme.zsh << 'EOF'
|
||||
|
|
@ -394,5 +395,5 @@ transfer() {
|
|||
EOF
|
||||
|
||||
|
||||
chown -R root.root /usr/local/share/zsh/site-functions
|
||||
chmod -R 755 /usr/local/share/zsh/site-functions
|
||||
sudo chown -R root.root /usr/local/share/zsh/site-functions
|
||||
sudo chmod -R 755 /usr/local/share/zsh/site-functions
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ cpufreq-info --latency # 10000
|
|||
# CPU 0 800000 kHz ( 33 %) - 800000 kHz ( 33 %) - userspace
|
||||
# CPU 1 800000 kHz ( 33 %) - 800000 kHz ( 33 %) - userspace
|
||||
|
||||
cpufreq-info --cpu 0
|
||||
cpufreq-info --cpu 1
|
||||
# cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
|
||||
# Report errors and bugs to cpufreq@vger.kernel.org, please.
|
||||
|
|
@ -60,9 +61,33 @@ cpufreq-info --cpu 1
|
|||
# current CPU frequency is 606 MHz.
|
||||
# cpufreq stats: 2.40 GHz:0.00%, 2.40 GHz:0.00%, 2.00 GHz:0.00%, 1.60 GHz:0.00%, 1.20 GHz:0.00%, 800 MHz:100.00% (1)
|
||||
|
||||
echo ""
|
||||
echo "If the intel_pstate driver is being used there are only two available governors, powersave and performance."
|
||||
echo ""
|
||||
|
||||
#GOVERNOR="userspace"
|
||||
GOVERNOR="ondemand"
|
||||
#GOVERNOR="powersave"
|
||||
#GOVERNOR="performance"
|
||||
|
||||
echo ""
|
||||
echo "Setting governor to ${GOVERNOR}"
|
||||
echo ""
|
||||
|
||||
echo " To use the ACPI driver you need to pass the 'intel_pstate=disable' on the kernel line and ensure the cpufreq_userspace kernel module is loaded."
|
||||
|
||||
echo "set the governor: cpupower frequency-set --governor userspace"
|
||||
echo "set the frequency: cpupower --cpu all frequency-set --freq 800MHz"
|
||||
echo ""
|
||||
|
||||
cpufreq-set \
|
||||
--cpu 2 \
|
||||
--cpu 0 \
|
||||
--governor ${GOVERNOR} \
|
||||
--min 800 \
|
||||
--max 1600 \
|
||||
--governor userspace \
|
||||
# --freq 1600
|
||||
|
||||
cpufreq-set \
|
||||
--cpu 1 \
|
||||
--governor ${GOVERNOR} \
|
||||
--min 800 \
|
||||
--max 1600
|
||||
|
|
|
|||
|
|
@ -0,0 +1,33 @@
|
|||
$ sudo losetup -f
|
||||
/dev/loop28
|
||||
$ sudo mknod /dev/loop28 b 7 28
|
||||
$ sudo mount /mnt/loops/parity01.img /mnt/snapraid/parity01
|
||||
|
||||
|
||||
-----
|
||||
LOOPDEV=$(losetup --find --show --partscan ${IMAGE_FILE})
|
||||
|
||||
# drop the first line, as this is our LOOPDEV itself, but we only want the child partitions
|
||||
PARTITIONS=$(lsblk --raw --output "MAJ:MIN" --noheadings ${LOOPDEV} | tail -n +2)
|
||||
COUNTER=1
|
||||
for i in $PARTITIONS; do
|
||||
MAJ=$(echo $i | cut -d: -f1)
|
||||
MIN=$(echo $i | cut -d: -f2)
|
||||
if [ ! -e "${LOOPDEV}p${COUNTER}" ]; then mknod ${LOOPDEV}p${COUNTER} b $MAJ $MIN; fi
|
||||
COUNTER=$((COUNTER + 1))
|
||||
done
|
||||
----
|
||||
|
||||
CAP=SYS_ADMIN or --privileged
|
||||
|
||||
In container:
|
||||
apt update && apt install -y gdisk
|
||||
dd if=/dev/zero of=/ofile.img bs=1M count=500
|
||||
sgdisk -n 1:2048:194559 -n 2:195560:300000 /ofile.img
|
||||
losetup -f /ofile.img -P --show
|
||||
ls -l /dev/loop*
|
||||
|
||||
In host:
|
||||
In host: see that partition files _have* been created: ls -l /dev/loop*
|
||||
|
||||
|
||||
Loading…
Reference in New Issue