drop ugent scripts and configuration
This commit is contained in:
parent
3ab14f6dd4
commit
ffced8fca4
14 changed files with 0 additions and 276 deletions
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
ICAROOT="$HOME/.ICAClient/linuxx64" "$HOME/.ICAClient/linuxx64/wfica" "$@"
|
|
@ -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"
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
qutebrowser --temp-basedir 'https://jusprd.aps.ugent.be'
|
|
@ -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"
|
|
@ -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"
|
|
@ -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 '
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
exec qutebrowser --basedir "$HOME/.config/microbrowser"
|
|
@ -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
|
|
@ -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
|
|
@ -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"
|
|
@ -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
|
|
@ -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
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue