Skip to content

Instantly share code, notes, and snippets.

View m4lvin's full-sized avatar
🤔

Malvin Gattinger m4lvin

🤔
View GitHub Profile
@m4lvin
m4lvin / zoom-update.sh
Created December 8, 2021 09:07
script to update zoom if necesary (on debian)
#!/bin/bash
url=https://zoom.us/client/latest/zoom_amd64.deb
file=/tmp/zoom_amd64.deb
availableVer=`wget -qN $url -O - | dpkg -f - version`
dpkgReport=`dpkg -s zoom`
echo "$dpkgReport" | grep '^Status: install ok' > /dev/null && \
installedVer=`echo "$dpkgReport" | grep ^Version: | sed -e 's/Version: //'`
@m4lvin
m4lvin / smd-inotify.sh
Created November 2, 2020 13:56
using inotifywait via SSH to watch a remote Maildir for mu4e and syncmaildir - replacing IMAP IDLE
#!/bin/bash
while true
do
echo "monitoring the remote Maildir ..."
if (ssh myemailserver inotifywait "~/Maildir" -e close_write); then
echo "got notification!"
date --rfc-3339=seconds
else
@m4lvin
m4lvin / mathgen.py
Last active April 27, 2020 10:21
Crawl the Mathematics Genealogy Project backwards, starting with two IDs and stopping when a common ancestor is found.
#!/usr/bin/python
'''
Crawl the Mathematics Genealogy Project backwards, starting with two IDs and stopping when a common ancestor is found.
The output without the lines tarting with "[" is a graph in DOT format for graphviz.
Based on a script by filip (2012-07-25) from https://github.com/eakbas/mathgen/
Edited by m4lvin (2019-05-08).
'''
import re
@m4lvin
m4lvin / stack-install-agda-plus-stdlib.sh
Created June 20, 2019 09:20
How to install Agda 2.5.4.2 from stackage with stack instead of cabal
# install Agda 2.5.4.2 from stackage with stack instead of cabal
cd $HOME
stack install --resolver lts-12.26 Agda
# install standard library v0.17
cd $HOME/gits
git clone
git clone https://github.com/agda/agda-stdlib.git
cd agda-stdlib
git checkout v0.17
@m4lvin
m4lvin / queens.txt
Created September 21, 2018 08:57
some stack extra-deps methods break stack ghci
Notes
With the below three files `stack build` and `stack exec queens` both work but `stack ghci` fails.
Still, `stack exec ghci` and then `import Data.HasCacBDD` work, but calling any function from the library fails.
Changing stack.yaml to "stack.yaml WORKING" below makes everything work.
So the question is, why does