Skip to content

Instantly share code, notes, and snippets.

View pille1842's full-sized avatar

Eric Haberstroh pille1842

View GitHub Profile
@pille1842
pille1842 / quatsch.sh
Last active April 22, 2020 19:28
Y tho
#!/usr/bin/zsh
units '1 hectare' 'm^2' | head -n1 | cut -d'*' -f2 | sed -e 's/ //g' -e 's/^/sqrt(/' -e 's/$/\)/' | bc -- | sed -e 's/$/ \^ 2/' | bc -- | sed -e 's/$/ m\^2/' | xargs -0 -I{} units -1 {} 'hectare' | cut -d'*' -f2 | sed 's/ //g' | echo $? >&2 1>/dev/null
@pille1842
pille1842 / HOWTO.md
Created October 3, 2018 19:42
Every Easter Sunday from 1700-2299

How was this file produced?

I took the dates from this site and saved them to a file. After cleaning it up in Emacs, it consisted of a list of dates, one date per line, in natural language (e.g. "1st April 2018", "12th April 2020"). I named the file eastersunday.in.

I installed parsedatetime with pip:

$ sudo -H pip3 install parsedatetime

Then I wrote this little script:

Inbox [0/2]

Emacs-Cursor umstellen

Destination Star Trek?

Nichols, O’Reilly & More Set for DST Germany and Birmingham DST in Dortmund <2018-04-27 Fr>–<2018-04-29 So>

Studium [0/1]

@pille1842
pille1842 / blog_2017-09-07.md
Created September 7, 2017 12:17
Get the driver to work for a Radeon HD 7600G on Ubuntu 16.04

Yesterday I put an SSD drive into my 2013 laptop, an Acer Aspire V5-551 which originally came with Windows 8. I decided on Ubuntu Mate 16.04 for the new operating system (before that, I had been running Windows 10 with quite some issues -- e.g. the internal wifi chip did not work, I had to use an external dongle).

Expecting the best, after I finished the installation, I sat on the couch with the laptop detached from power. Then the issues started. When logged into the graphical environment, the machine would randomly hang and freeze after a few seconds. Not even changing to a console worked after such a freeze, I had to do a hard reset each time.

Initially I thought this was a problem with TLP, the power-saving tool for laptops, since I have had problems with TLP on this machine before. Disabling TLP did not improve the situation, however. After enabling persistent logging, I was able to hunt down the bad guy: the open-source Radeon GPU driver. It would spit out the following message again and again after a

@pille1842
pille1842 / blog_2017-03-08.md
Last active March 8, 2017 18:15
Disable annoying security warnings in Firefox

In Firefox 52, Mozilla has added a "feature" that shows a warning on any login fields if the connection is not secured with HTTPS. You can disable this warning by changing a configuration value:

  1. Go to about:config
  2. Search for "secure"
  3. Change the value of security.insecure_field_warning.contextual.enabled to false by double-clicking on it.

If you want to restore Autofill on HTTP sites, you will also need to change the value of signon.autofillForms.http to true in the same way.

@pille1842
pille1842 / absender.lco
Last active March 2, 2017 14:03 — forked from puppe/absender.lco
Deutsche Briefvorlage für LaTeX (scrlttr2)
\ProvidesFile{absender.lco}
\KOMAoptions{%
% fromemail=true, % Email wird im Briefkopf angezeigt
% fromphone=true, % Telefonnumer wird im Briefkopf angezeigt
% fromfax=true, % Faxnummer wird im Briefkopf angezeit
% fromurl=true, % URL wird im Briefkopf angezeigt
% fromlogo=true, % Logo wird im Briefkopf angezeigt
% subject=titled, % Druckt "Betrifft: " vor dem Betreff
locfield=wide, % Breite Absenderergänzung (location)
@pille1842
pille1842 / blog_2017-02-09.md
Last active February 8, 2017 23:25
Slick fast feed aggregation

Personally, I read a few blogs and feeds that I like to keep an eye on. The Debian Security and Debian News feeds, for example, since sometimes I'd like to know if any vulnerabilities are coming my way. (Though they rarely affect me.) The cooking blog of a close friend, Cuisine Carolin. George R.R. Martin's "Not a Blog". When I have a bit of spare time for reading stuff on the web, I don't want to visit each of those sites to look for new posts. So, the natural decision is to have a feed aggregator.

Ages ago I used Google Reader for this purpose, and it was quite an alarming experience when it suddenly shut down (although they did give their users enough time to take out their data, which was nice). After that I switched to Feedly, where you could import your Google Reader data and continue where you stopped. But the experience of losing a service that I very much liked because the owner of that service decided that it was no longer worth the

@pille1842
pille1842 / gistlog.yml
Last active June 2, 2022 21:33
Validate IBANs in the shell
published: true