initial commit

Este commit está contenido en:
ale
2024-10-03 01:47:38 +02:00
commit 72d18ac6c0
Se han modificado 25 ficheros con 596 adiciones y 0 borrados

Ver fichero

@@ -0,0 +1,3 @@
$ alias temp="vcgencmd measure_temp"
$ temp
temp=64.5'C

Ver fichero

@@ -0,0 +1,3 @@
#!/bin/bash │·
for i in $(docker ps -a | tail +2 | awk '{print $1}'); do docker rm $i; done │·
for i in $(docker images | tail +2 | awk '{print $3}'); do docker rmi $i; done

Ver fichero

@@ -0,0 +1,30 @@
#!/bin/bash
THREADS=8
apt update && apt install -y build-essential cmake automake git libtool pkg-config libev-dev
rm -rf /usr/local/tmp && mkdir -p /usr/local/tmp && cd /usr/local/tmp
git clone --depth 1 -b openssl-quic-draft-22 https://github.com/tatsuhiro-t/openssl openssl
cd openssl
./config enable-tls1_3 enable-shared --prefix=/usr/lib/x86_64-linux-gnu
make -j$THREADS && make install_sw || exit 0
cd ..
git clone https://github.com/ngtcp2/nghttp3
cd nghttp3
sed -i 's/PKG_PROG_PKG_CONFIG([0.20])/PKG_PROG_PKG_CONFIG([0.29])/' configure.ac
autoreconf -i
./configure --prefix=/usr/lib/x86_64-linux-gnu --enable-lib-only
make -j$THREADS && make install || exit 0
cd ..
git clone -b draft-25 https://github.com/ngtcp2/ngtcp2
cd ngtcp2
autoreconf -i
./configure PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/lib/pkgconfig LDFLAGS="-Wl,-rpath,/usr/lib/x86_64-linux-gnu/lib" --prefix=/usr/lib/x86_64-linux-gnu
make -j$THREADS && make install || exit 0
cd ..
git clone https://github.com/curl/curl
cd curl
git checkout curl-7_69_1
./buildconf
LDFLAGS="-Wl,-rpath,/usr/lib/x86_64-linux-gnu/lib" ./configure --with-ssl=/usr/lib/x86_64-linux-gnu --with-nghttp3=/usr/lib/x86_64-linux-gnu --with-ngtcp2=/usr/lib/x86_64-linux-gnu --prefix=/usr/local --libdir=/usr/lib/x86_64-linux-gnu --enable-alt-svc
make -j$THREADS && make install || exit 0
rm -rf /usr/local/tmp
LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu /usr/local/bin/curl -V

6
bash/certs.sh Archivo normal
Ver fichero

@@ -0,0 +1,6 @@
#!/bin/bash
DOMAINS="domain.com example.com pepe.com"
for domain in $DOMAINS; do
echo $domain
openssl s_client -connect $domain:443 2>/dev/null </dev/null | grep "NotAfter" | head -n 1
done

10
bash/clean-mastodon.sh Archivo normal
Ver fichero

@@ -0,0 +1,10 @@
#!/bin/bash
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export RAILS_ENV=production
bin/tootctl statuses remove
bin/tootctl media remove --days=30
bin/tootctl preview_cards remove --days=30
bin/tootctl media remove-orphans
bin/tootctl media usage

2
bash/mp3.sh Archivo normal
Ver fichero

@@ -0,0 +1,2 @@
#!/bin/bash
yt-dlp -i -x -f m4a --audio-format mp3 "$1"

2
bash/pssh.sh Archivo normal
Ver fichero

@@ -0,0 +1,2 @@
#!/bin/bash
parallel-ssh -i -h psshost.txt -t 0 -O StrictHostKeyChecking=no -o pssh -A $@

9
bash/stats-project.sh Archivo normal
Ver fichero

@@ -0,0 +1,9 @@
#!/bin/bash
echo -e "Lines:\n"
for lang in "Java" "XML" "JSP" "Properties" "JRXML" "HTML" "CSS" "JS"; do
files=($(find . -iname "*.$lang"))
if [ ${#files[@]} -ne 0 ]; then
count=$(wc -l ${files[@]} | tail -n1 | xargs)
echo "$lang: ${#files[@]} files - $count lines"
fi
done

1
bash/temp.sh Archivo normal
Ver fichero

@@ -0,0 +1 @@
while((1)); do vcgencmd measure_temp; sleep 3s; done

2
bash/youtube-mp3.sh Archivo normal
Ver fichero

@@ -0,0 +1,2 @@
#!/bin/bash
youtube-dl -i -f m4a -x --audio-format mp3 $1