Sorting out Python generator functions and yield from in my head
Through a chain of reading, I wound up at How the heck doesasync/await work in Python 3.5? (via the Trio tutorial ).As has happened before when I started reading about Python 3's new async and await stuff, my head started hurting when I hit thesomewhat breezy discussion of yield from and I felt the need toslow down and try to solidly understand this, which I haven't reallybefore.
Generator functions are functions that contain a yield statement:
def fred(
OpenSSH's IdentityFile directive only ever adds identity files (as of 7.4)
In some complicated scenarios (especially with 2FA devices ), even IdentitiesOnly can potentially giveyou too many identities between relatively generic Host ... entries and host-specific ones. Since there is only so far it'ssensible to push Host ... entries with negated hostnames beforeyou wind up with a terrible mess, there are situations where itwould be nice to be able to say something like:
Host *.ourdomain IdentityFile ... IdentityFile ... [...]Host something-
What should it mean for a system call to time out?
I was just reading Evan Klitzke's Unix System Call Timeouts ( via ) and amonga number of thoughts about it, one of the things that struck me isa simple question. Namely, what should it mean for a Unix systemcall to time out?
This question may sound pointlessly philosophical, but it's actuallyvery important because what we expect a system call timeout to meanwill make a significant difference in how easy it would be to addsystem calls with timeouts. So let's sketch out two
CSS, <pre>, and trailing whitespace lead to browser layout weirdness
Today someone left a comment on this entry of mine about Python which consisted of a block of code.The comment looked normal in my feed reader, but when I looked atit in my browser ( for neurotic reasons )I got a surprise; the new comment was forcing my Firefox to displaythe page really widely, with even regular text out of my viewport.This was very surprising because I theoretically made thatimpossible years ago , by forcing all
blocks in comments to have a CSSwhite-space
Your live web server probably has features you don't know about
As has become traditional, I'll start with my tweet :
TIL that Ubuntu gives you an Apache /cgi-bin/ script alias that mapsto /usr/lib/cgi-bin. Do you know what's in that dir on your webserver?
Most web servers have configuration files and configuration processesthat are sufficiently complicated that almost no one writesconfigurations for them from scratch from the ground up. For theirown reasons, these servers simply require you to specify too manythings; all of the
Malware is sometimes sent through organized, purchased infrastructure
Every so often, I wonder where malware comes from. Well, in amechanical sense ;does it come from infected machines, or from rented botnets, or what?Today we got a malware attack campaign that gave us a very clear answer:it came from dedicated, custom-built infrastructure.
Between 12:17 and 12:28 today, a cluster of four IP addresses triedto send us 376 email messages. All of them had a HELO and verifiedhost name of confidentialdocumentdelivery
I wish you could whitelist kernel modules, instead of blacklisting them
There was another Ubuntu kernel security update released today,this time one for CVE-2017-2636 .It's a double-free in the N_HDLC line discipline, which canapparently be exploited to escalate privileges (per the news aboutit ).Another double-free issue was also the cause of CVE-2017-6074 ; based on what AndreyKonovalov said for the latter, these issues are generally exploitablewith standard techniques. Both were
An AMD Ryzen is unlikely to be my next desktop's CPU
I'm probably going to wind up building a new home machine this year,to replace my current five year old one .One of the reasons I haven't been doing much on this yet is thatboth Intel and AMD only recently released their latest desktop CPUlines, Kaby Lake and Ryzen respectively. AMD hasnot been particularly competitive in CPUs for years now, so there'sbeen a lot of hope attached to Ryzen; plenty of people really wantAMD to come through this time around so Intel would
Modern X Windows can be a very complicated environment
I mentioned Corebird, the GTK+ Twitter client the other day, and generally positive. That was on a logical weekend.The next day I went in to the office, set up Corebird there, andpromptly ran into a problem: I couldn't click on links in Tweets,or rather I could but it didn't activate the link (it would oftendo other things). Corebird wasn't ignoring left mouse clicks ingeneral, it's just that they wouldn't activate links.
Why I (as a sysadmin) reflexively dislike various remote file access tools for editors
I somewhat recently ran across this irreal.org entry (because it refers to my entryon staying with Emacs for code editing ), and in a side note itmentions this:
[Chris] does a lot of sysadmin work and prefers Vim for that (although Ithink Tramp would go a longway towards meeting the needs that he thinks Vim resolves).
This is partly in reference to my entry on Why
vihas becomemy sysadmin's editor , and at the end of thatentry I dismissed remote fileMenu
![]()