drop ugent scripts and configuration

This commit is contained in:
Felix Van der Jeugt 2024-07-24 08:03:10 +02:00
parent 3ab14f6dd4
commit ffced8fca4
No known key found for this signature in database
GPG Key ID: 58B209295023754D
14 changed files with 0 additions and 276 deletions

View File

@ -1,2 +0,0 @@
#!/bin/sh
ICAROOT="$HOME/.ICAClient/linuxx64" "$HOME/.ICAClient/linuxx64/wfica" "$@"

View File

@ -1,19 +0,0 @@
#!/bin/sh
sudo sv stop iwd
conf="$(mktemp)"
trap "rm '$conf'" EXIT QUIT
cat > "$conf" <<HERE
ctrl_interface=DIR=/run/wpa_supplicant GROUP=wheel
network={
ssid="eduroam"
key_mgmt=WPA-EAP
auth_alg=OPEN
eap=PEAP
identity="fvdrjeug@ugent.be"
password="$(pass show ugent/_ | head -1)"
}
HERE
sudo wpa_supplicant -iwlp58s0 -c"$conf"

View File

@ -1,2 +0,0 @@
#!/bin/sh
qutebrowser --temp-basedir 'https://jusprd.aps.ugent.be'

View File

@ -1,24 +0,0 @@
#!/bin/bash
wd="$(pwd)"
temp="$(mktemp)"
name="$(basename "$0")"
find /data -name '.git' -exec dirname \{\} \; | while read gitrepo; do
cd "$gitrepo"
case "$name" in
"gitfetcher")
echo "$gitrepo"
git remote | while read remote; do
git fetch --prune "$remote"
done 2>&1 | sed 's/^/ /'
;;
"gitlister")
if git status | grep -q behind; then
echo "$gitrepo"
fi
;;
esac
done
cd "$wd"

View File

@ -1,11 +0,0 @@
#!/bin/sh
base='https://tap.zeus.gent'
user='felixvdj'
token="$(pass show ugent/zeus/tap)"
curl --header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "Authorization: Token token=$token" \
--data '{"order":{"order_items_attributes":[{"count":1,"product_id":1}]}}' \
--location \
"$base/users/$user/orders.json"

View File

@ -1,35 +0,0 @@
#!/bin/sh
pandoc -f markdown --mathml -s -t html5 "$1" | \
sed 's/<math/<span style="font-size: 10pt;">&/g;s|</math>|&</span>|g;s/<table/& border=1 /g' | \
sed 's/{studentnr}/{OrgDefinedId}/' | \
sed 's@<div class="sourceCode"@<div style="background:#EEEEEE;padding:0 0.5em;border: 1px solid #AAAAAA;"@g ' | \
sed 's@<span class="al">@<span style="color: #ff0000; font-weight: bold;">@g ' | \
sed 's@<span class="an">@<span style="color: #60a0b0; font-weight: bold; font-style: italic;">@g ' | \
sed 's@<span class="at">@<span style="color: #7d9029;">@g ' | \
sed 's@<span class="bn">@<span style="color: #40a070;">@g ' | \
sed 's@<span class="bu">@<span style="">@g ' | \
sed 's@<span class="cf">@<span style="color: #007020; font-weight: bold;">@g ' | \
sed 's@<span class="ch">@<span style="color: #4070a0;">@g ' | \
sed 's@<span class="cn">@<span style="color: #880000;">@g ' | \
sed 's@<span class="co">@<span style="color: #60a0b0; font-style: italic;">@g ' | \
sed 's@<span class="cv">@<span style="color: #60a0b0; font-weight: bold; font-style: italic;">@g ' | \
sed 's@<span class="do">@<span style="color: #ba2121; font-style: italic;">@g ' | \
sed 's@<span class="dt">@<span style="color: #902000;">@g ' | \
sed 's@<span class="dv">@<span style="color: #40a070;">@g ' | \
sed 's@<span class="er">@<span style="color: #ff0000; font-weight: bold;">@g ' | \
sed 's@<span class="ex">@<span style="">@g ' | \
sed 's@<span class="fl">@<span style="color: #40a070;">@g ' | \
sed 's@<span class="fu">@<span style="color: #06287e;">@g ' | \
sed 's@<span class="im">@<span style="">@g ' | \
sed 's@<span class="in">@<span style="color: #60a0b0; font-weight: bold; font-style: italic;">@g ' | \
sed 's@<span class="kw">@<span style="color: #007020; font-weight: bold;">@g ' | \
sed 's@<span class="op">@<span style="color: #666666;">@g ' | \
sed 's@<span class="ot">@<span style="color: #007020;">@g ' | \
sed 's@<span class="pp">@<span style="color: #bc7a00;">@g ' | \
sed 's@<span class="sc">@<span style="color: #4070a0;">@g ' | \
sed 's@<span class="ss">@<span style="color: #bb6688;">@g ' | \
sed 's@<span class="st">@<span style="color: #4070a0;">@g ' | \
sed 's@<span class="va">@<span style="color: #19177c;">@g ' | \
sed 's@<span class="vs">@<span style="color: #4070a0;">@g ' | \
sed 's@<span class="wa">@<span style="color: #60a0b0; font-weight: bold; font-style: italic;">@g '

View File

@ -1,2 +0,0 @@
#!/bin/sh
exec qutebrowser --basedir "$HOME/.config/microbrowser"

View File

@ -1,9 +0,0 @@
#!/bin/sh
printf 'OrgDefinedId,%s Text Grade,End-of-Line Indicator\n' "${1:-Commit}"
for d in 0*; do
cd "$d"
printf "#%s,%s,#\n" "$d" "$(git log --oneline | head -1 | tr -d ',')"
cd ..
done

View File

@ -1,40 +0,0 @@
#!/bin/sh
task="$1"
repo="$2"
set -e
if [ ! -d "$repo" ]; then
mkdir -p "$repo"
cd "$repo"
git init
else
cd "$repo"
fi
if [ ! -z "$(git status --porcelain)" ]; then
echo "Requires a clean working tree" >&2
exit 1
fi
# update existing submodules
git submodule foreach git fetch origin
git submodule foreach git reset --hard origin/master > /dev/null 2>&1
for remote in $(ssh git@subgit.ugent.be task students -l "$task" | cut -f4); do
if [ -d "$(basename "$remote")" ]; then continue; fi # exists
remotes="$(git ls-remote "$remote")"
if ! echo "$remotes" | grep -q HEAD; then
printf 'No HEAD at %s' "$remote"
count="$(echo "$remotes" | grep -o refs/heads | wc -l)"
if [ "$count" -gt 0 ]; then printf ' (but %d other)' "$count"; fi
printf '\n'
else
echo "adding $remote"
git submodule --quiet add --force "$remote" || true
fi
done
git add .
git commit -v

View File

@ -1,14 +0,0 @@
#!/bin/sh
# lines of form:
# Givenname Last Name (student number) <email address>
LIST="${LIST:-$HOME/.local/share/students.list}"
while read line; do
name="${line% (*}"
number="${line%) *}"
number="${number#* (}"
if [ -e "$number" ]; then
ln -s "$number" "$name"
fi
done < "$LIST"

View File

@ -1,59 +0,0 @@
#!/bin/sh
help() {
echo "usage: $0 [--colour] <file>"
echo
echo " -c | --colour print in colour"
echo " -r | --rasterize raster pdf before printing"
echo " file file (print-ready) to print or -"
echo
echo "print print-ready files with the UGent printers. Accepts only"
echo ".txt, .ps, .pdf, .pcl, .cht and .prn."
exit 1
}
if [ -z "$1" ]; then help; fi >&2
printer="print_mono"
format="tiffscaled8"
raster=""
while [ -n "$2" ]; do
case "$1" in
-c|--colour) printer="print_colour"
format="tiffscaled24"
;;
-r|--raster) raster="true"
;;
*) help
;;
esac
shift
done
printfile="$1"
if test -n "$raster"; then
tiff="$(mktemp)"
printfile="$(mktemp)"
gs -sDEVICE="$format" -o "$tiff" "$1"
tiff2pdf -z -f -F -pA4 -o "$printfile" "$tiff"
rm "$tiff"
fi
# pdf2ps -dLanguageLevel=1 input.pdf - | ps2pdf -sPAPERSIZE=a4 - output.pdf
print_colour() {
curl --silent --insecure \
-F "fileToPrint=@$1" \
-F "FormButtonSubmit=Print" \
'https://we02pr06.ugent.be/hp/device/Print/Print'
}
print_mono() {
curl --silent --insecure \
-F "localFile=@$1" \
'https://we02pr04.ugent.be/hp/device/this.printservice?printThis'
}
"$printer" "$printfile"
if test -n "$raster"; then rm "$printfile"; fi

View File

@ -1,6 +0,0 @@
#!/bin/sh
cat /data/random/ips | while read name host ip; do
ping -c1 -w1 "$ip" > /dev/null && echo "$name"
done

View File

@ -1,14 +1,4 @@
# Accounts {{{
IMAPAccount ugent
Host "outlook.office365.com"
Port 993
User "felix.vanderjeugt@ugent.be"
PassCmd "mfauth access microsoft"
AuthMechs "XOAUTH2"
SSLType "IMAPS"
SSLVersions "TLSv1"
CertificateFile "/etc/ssl/certs/ca-certificates.crt"
IMAPAccount posteo
Host "posteo.de"
User "felix.vanderjeugt@posteo.net"
@ -17,44 +7,17 @@ SSLTYPE "IMAPS"
# }}} Accounts
# Remote Stores {{{
IMAPStore ugent-remote
Account "ugent"
IMAPStore posteo-remote
Account "posteo"
# }}}
# Local Stores {{{
MaildirStore ugent-local
Path "/data/mail/ugent/"
Inbox "/data/mail/ugent/Inbox"
Trash "/data/mail/ugent/Trash"
SubFolders "Verbatim"
MaildirStore posteo-local
Path "/data/mail/posteo/"
Inbox "/data/mail/posteo/Inbox"
# }}}
# Channels {{{
Channel ugent-inbox
Far ":ugent-remote:INBOX"
Near ":ugent-local:"
Create "Near"
SyncState "*"
Channel ugent-sent
Far ":ugent-remote:Verzonden Items"
Near ":ugent-local:Sent"
Create "Near"
SyncState "*"
Channel ugent-trash
Far ":ugent-remote:Verwijderde Items"
Near ":ugent-local:Trash"
Create "Near"
SyncState "*"
Channel posteo-inbox
Far ":posteo-remote:INBOX"
Near ":posteo-local:"
@ -81,11 +44,6 @@ SyncState "*"
# }}}
# Groups {{{
Group ugent
Channel "ugent-inbox"
Channel "ugent-sent"
Channel "ugent-trash"
Group posteo
Channel "posteo-inbox"
Channel "posteo-sent"

11
msmtprc
View File

@ -6,17 +6,6 @@ tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/.local/share/msmtp.log
account ugent
from felix.vanderjeugt@ugent.be
auth xoauth2
host outlook.office365.com
port 587
user felix.vanderjeugt@ugent.be
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
passwordeval "mfauth access microsoft"
account posteo
host posteo.de
port 587