This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! | |
! Add German diaereses (Umlauts) and some currency signs to current keymap | |
! as <AltGr> alternatives to related English letter keys, e.g. | |
! | |
! <AltGr>-<A> = ä | |
! <AltGr>-<Shift>-<A> = Ä | |
! | |
! Load with "xmodmap .Xmodmap-AddUmlauts" | |
! | |
! ---------------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Nils Toedtmann https://github.com/nilstoedtmann 2017-01-25 | |
// | |
// Add German letters (diaereses/umlauts and Eszett) and currency | |
// signs to selected English keyboard layouts on level3 (<AltGr>) | |
// | |
// Save as /usr/share/X11/xkb/symbols/deng. To load: | |
// | |
// setxkbmap deng # US-based | |
// setxkbmap 'deng(gb)' # UK-based | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Test behaviour various printing methonds without TTY. | |
If you run it with a TTY, all is as expected: print() and sys.stdout flush | |
thir buffers after each NewLine '\n': | |
python test-stdout-buffering.py | |
However, if you take the TTY away and run it in PIPE mode, then Python's | |
buffers much more agressively across '\n'! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
'''Retrieve and parse MailGun bounces & suppressions via MailGun API. | |
Set MAILGUN_API_KEY and MAILGUN_DOMAIN as env vars. | |
See https://documentation.mailgun.com/en/latest/api-suppressions.html#view-all-bounces | |
''' | |
import os, sys, json, logging, requests, datetime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'''Write 1000 log messages; wait 1-10ms inbetween.''' | |
# See also: | |
# - https://stackoverflow.com/q/15096090 | |
# - https://stackoverflow.com/q/38219512 | |
# To test, fork 1000 concurrent processes: | |
# for i in {1..1000} ; do ( python logtest.py & ) ; done | |
import logging, random, time, os |