Bread Pudding
Saucepan
Milk - 2 cupsButter - 2 tablespoons
Vanilla - 1 teaspoon
White Sugar - 1/3 cup
Salt - pinch
Warm up saucepan (not boiling)
Saucepan
Milk - 2 cupsRecently decided to make use of the CAPS LOCK key to avoid having to move my hands to the arrow keys when I needed arrow key stuff. After a bunch of googling came across https://www.autohotkey.com/
My goal here was to have CAPS LOCK function normally if you press and release it, but if you press and hold, it should act as a modifier. I didn't see this as a pre-canned example, and after much questionable AI, decided to just code it from scratch. OK, AI helped a bit, but was really bad at hallucinations.
I decided on using ijkl for the navigation but I'm thinking now that maybe vim navigation is better. I'm having to stretch to get the end key while editing so that's probably a good thing to do as well. Home and end. And maybe that makes more sense with H being home, and ; being end since they are around the navigation. A work in progress I guess.
Here's what I ended up with:
#Requires AutoHotkey v2.0
#Include "C:\Users\nik\Documents\AutoHotkey\TapHoldManager\AHK v2\Lib\TapHoldManager.ahk"
#SingleInstance
capsHeld := false
;
; We got a Caps Lock
; If holding it, just set global flag
; If tapping it, send CapsLock on or off which toggles it
;
CapsLockHandler(isHold, taps, state) {
Global capsHeld
if isHold {
if (capsHeld = true) {
capsHeld := false
} else {
capsHeld := true
}
} else {
Send("{Blind}{CapsLock}")
}
}
thm := TapHoldManager()
thm.Add("CapsLock", CapsLockHandler)
;
; Handle keypress
;
*j:: {
if capsHeld {
Send("{Left}")
} else {
Send("{Blind}j")
}
}
*k:: {
if capsHeld {
Send("{Down}")
} else {
Send("{Blind}k")
}
}
*l:: {
if capsHeld {
Send("{Right}")
} else {
Send("{Blind}l")
}
}
*i:: {
if capsHeld {
Send("{Up}")
} else {
Send("{Blind}i")
}
}
; removeTooltip() {
; ToolTip
; }
; ToolTip("CapsLock released")
; SetTimer(removeTooltip, -1000)
The ToolTip things being me adding in debugging messages.
I've used TheForeman and Canonical MaaS (and have heard of Cobbler), and while they can and do work, they can be a bit fiddly to understand, and if something goes wrong everything is so abstracted it can be hard to understand how things should be working and what you need to do to fix things.
So, I decided to take a step back and look at how you would configure automated installs the old fashioned way, by hand. This gives a better understanding on what's going off under the hood and helps debug things if you're having a problem with your pre-packaged bare metal deploy automation.
First things, I'm using ISC DHCPD (I guess about time I swapped to something newer), and have a host entry like:
So, create a custom local override /etc/systemd/system/tftp.service by doing systemctl edit --full tftp, and add in "-v" to the tftp invocation so that things look like:
[Unit]Description=Tftp ServerRequires=tftp.socketDocumentation=man:in.tftpd[Service]ExecStart=/usr/sbin/in.tftpd -v -s /var/lib/tftpbootStandardInput=socket[Install]Also=tftp.socket
RRQ from ::ffff:192.168.2.64 filename rhel8/redhat/EFI/BOOT/BOOTX64.EFI
rhel8/redhat/EFI/BOOT:BOOTX64.EFI grub.cfg grubx64.efi README.mdrhel8/images/pxeboot:initrd.img README.md vmlinuz
tl;dr - if you want to run IPv6 on an internal network with an internal router behind a FIOS G1100 router, you must carve up a different /64 network from the /64 the FIOS gives you on the LAN interface, and then also update the FIOS G1100 route table to have a static route to this different /64 network, passing it to the "WAN" interface of your internal router which is really just connected to the LAN interface of the FIOS G1100 router.
IPv6, it's been around for a while. Verizon supports it and if I look at my Verizon Fios-G1100 router, I can also turn on IPv6:
What's interesting is the Fios-G1100 is configured to act as a DHCP server and so gives out a /64 address on the LAN:
So I have a singular Linux router behind my Fios-G1100 so I can have more options with experimenting with stuff, and on the Linux router on my public interface, I see:
3: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 1c:1b:0d:03:bb:ec brd ff:ff:ff:ff:ff:ff
inet 192.168.1.2/24 brd 192.168.1.255 scope global noprefixroute enp0s31f6
valid_lft forever preferred_lft forever
inet6 2600:1234:5678:abcd:1e1b:dff:fe03:bbec/64 scope global
valid_lft 1258sec preferred_lft 1258sec
inet6 fe80::1e1b:dff:fe03:bbec/64 scope link
valid_lft forever preferred_lft forever
So it gives me out a singular /64, which is fine here. A bit strange that to Verizon I have a singular machine on my network. With the IPv4, I'm running NAT so get 192.168.1.2 here, with the Verizon router being 192.168.1.1. With IPv6, I get a public IP on the /64 network carved out from the /56 network. So that's one /64 network out of 255 possible in the /56. What was the challenge for me was that internally I wanted to have the /64 network available to all my boxes being my Linux router. That didn't work as I wanted to have the same 2600:1234:5678:abcd::/64 network on my LAN side of the Linux router that was the same as the /64 network on the WAN side of my Linux router, using the same /64 network assigned on the LAN side of the FIOS router. That confused routing of various things on the Linux side after setting up IP forwarding.
Here's how I was trying to define the LAN interface, which is wrong:
The solution, as I stumbled across it, is to actually carve up a different /64 network for my internal Linux router LAN address and then configure the FIOS router to have a static route to that network:
I recently took up cloud-init professionally as part of exploring modern(?) alternatives to kickstart for the on-premises private cloud. All worked fine, is all viable, after I actually figured out where to put the config entries...
Cloud-init has a couple of config files:
metadata:
#cloud-config
instance-id: test
hostname: test.localhost
network:
version: 2
ethernets:
eth0:
match:
name: eth*
etc. etc. etc.
user-data:
users:
- name: cloud-user
ssh_authorized_keys:
- ssh-rsa [our public key] root@our-bastion.localhost
sudo: ALL=(ALL) NOPASSWD:ALL
etc. etc. etc.
All looks good, looks reasonable. The challenge in getting this far was that in reading the docs it was not apparent at the time what config entries go in which file. For example, if I put things for the network in the user-data file it was parsed correctly and I could see the YAML was loaded correctly into the various python dictionaries in the code, but then later on it was just ignored. The docs note in vague ways that the metadata is for the environment and the user-data is specifics for this particular system. Which was what got me into trouble initially putting the network information in the user-data, IDK.
Looking at the code, using YAML for configuration and the easy way it's parsed and loaded into a dictionary is very powerful for adding configuration information to your software. The downside is if you name something slightly wrong or if you put something not quite in the right location, things will just be silently ignored.
There are a couple of schools of thought here, and I've seen both professionally. One is that you should code things explicitly to look for the commands / statements and if there is something not explicitly recognized then you flag as an error. This style of coding is a bit of a challenge to modify, and in one particular case I've needed to extend multiple code locations so that a new argument/statement is a) parsed correctly (in one module), b) consumed correctly (in a different module), and then c) acted upon in a third module. A lot of work for just adding a similar statement, but it does mean if there's something not quite right, we will notice it right away. At the expense of making the code harder to work with and extend.
The second school of thought is that as configuration information is consumed, you only look for and act upon things you know you are looking for and acting on. This code is trivial to extend, you just add something to the "act upon" section and consume whatever it is you're looking for. The downside here is that if you add some configuration that's not quite right, likely it will just be ignored since nothing is looking for it.
This is the approach that cloud-init takes, and for good reason as there are multiple / modularized consumers all looking at the same dictionary and so any extension should be able to just consume whatever configuration it thinks it needs.
So this left me thinking, is there a way that we can have a central YAML file that is loaded into a python dictionary and that some overseer can look at the end and make sure that everything you specified was actually used? I think YES, based on a quick subclass of dict:
class NewDict(dict):def __init__(self, *args, **kwargs):super(NewDict, self).__init__(*args, **kwargs)self._used_flags = {key: False for key in self.keys()}
def set_used(self, key, used_arg = True):# print(f"(Setting used flag for {key} to {used_arg})")if key in self:self._used_flags[key] = used_argdef is_used(self, key):_used_flags = self._used_flags.get(key,False) # print(f"(Getting used flag for {key} - it is {_used_flags})")return(_used_flags)
After a brief vacation, time to start brain dumping on this blog again. Who knows maybe I will tweet again too.
Formatting and readability is a bit fugly on the command line but this does it nicely. As a bonus it sees if things are converted already and don't do a conversion.
$ for filename in *.AVI; do filepart=${filename%%.AVI}; if [ ! -e ${filepart}.mp4 ] ; then echo ffmpeg -i ${filepart}.avi ${filepart}.mp4; fi; done | sh -x
“You know,” she says, “America was so dominantly Protestant for such a long time. We have a substantial number of Catholics but the culture was really shaped by Protestants – in term of their total cultural domination of the United States at its founding, and really continuing.”
One aspect of this, she highlights, is the adoption of a Protestant work ethic as a core value in society. This has a positive side – in honouring human labour – but it also has a negative side.
“There is a profound suspicion of anyone who is poor, and a consequent raising to the highest priority imposing incredibly humiliating, harsh conditions on access to welfare benefits on the assumption you’re some kind of grifter, or you’re trying to cheat the system.
“There is no appreciation for the existence of structural poverty, poverty that is not the fault of your own but because the economy maybe is in recession or, in a notorious Irish case, the potato crop fails.”
But the researchers found that in 38 percent of the impacted colonies, the polyps had devised a survival strategy: shrinking their dimensions, partly abandoning their original skeleton, and gradually, over a period of several years, growing back and starting a new skeleton.
something(somethingelse(trythis(internalpart(updateothers(runstuff)))))
something(parameter).object(otherthing(innerpart).state(optionalrewind))
We need to figure out, and not necessarily now, but at some point in the near future perhaps when we can get a consensus or when the time is right but not just because we want to be opportunistic agnostic, what, or perhaps even first why or maybe the rationale behind this and related activities that you and according to at least a couple of other people although this is just third party because I haven't heard directly from them but I have been able to glean by reading between the lines of interactions, our next steps should be.
We need to figure out, and not necessarily now, but at some point in the near future perhaps when we can get a consensus or when the time is right but not just because we want to be opportunistic agnostic, what, or perhaps even first why or maybe the rationale behind this and related activities that you and according to at least a couple of other people although this is just third party because I haven't heard directly from them but I have been able to glean by reading between the lines of interactions, our next steps should be.
[something...] according to police reports via court order leaked by the assistant to the then deputy director who had been allegedly deposed by the now acting associate vice president under executive approval as reported to news personnel by an anonymous tip said the ex chief after hearing reports of this on Thursday from his staff.
(python) x=np.array([[1,2,3],[4,5,6],[7,8,9],[10,11,12],[13,14,15]])
(python) x
array([[ 1, 2, 3],
[ 4, 5, 6],
[ 7, 8, 9],
[10, 11, 12],
[13, 14, 15]])
Karen Jennings had once been a manager at McDonalds. Walking home a little the worse for drink, she fell into a creek and broke her back. The doctor prescribed painkillers to ease her through the pain of recovery.and then goes on to talk about the spiral of addiction.
“Whether one is going to use drugs or not is a choice based on what the alternative reinforcers are,” he said. “If you have nothing else to do and life is not very pleasant, if you are a social creature—for example, a rat, and you are solo-housed in a boring environment as rats are generally housed for experiments, in that setting it is very easy to get animals to self-administer drugs. If one has them in an enriched environment in which they can socialize, have sex, groom, all those things that rats like to do, then it’s much more difficult to get them to self-administer drugs. It’s much more difficult to induce something that looks like an animal model of addiction.”It’s a fair bet that if humans were forced to live in the same conditions as the rats in Taha’s experiment—alone, in a tiny cage, with nothing to do—and given unlimited access to drugs, they might pass the time by using drugs, too.They note that genetics may be involved namely that the inability of the lateral habenula region to respond to negative outcomes (painful stimulus for example) prevents us from avoiding those actions in the future. In rat simulations they artificially damaged the lateral habenula in some rats and noticed that they did not avoid actions which later had negative outcomes.


1 Minute - The amount of time, on average per night, that a group of modern Tanzanian hunter-gatherers were all asleep at the same time. Experts say the minuscule overlap supports the notion that humans evolved different sleep patterns as a way to ensure someone was up to alert others of nighttime threats, such as predators.
What are these metamaterials? They are substances that have ...
History suggests that the process is much more uneven than that. The ATM, for example, is a textbook example of a machine that was designed to replace human labor. First introduced around 1970, ATMs hit widespread adoption in the late 1990s. Today, there are more than 400,000 ATMs in the US. But, as economist James Bessen has shown, the number of bank tellers actually rose between 2000 and 2010. That's because even though the average number of tellers per branch fell, ATMs made it cheaper to open branches, so banks opened more of them. ... Taking a wider view, Bessen found that of the 271 occupations listed on the 1950 census only one - elevator operator - had been rendered obsolete by automation by 2010.
Many scientists agree that moist, smokeless tobacco, including chewing and dipping tobacco, is significantly less harmful than cigarettes. But rather than encouraging the country’s 37 million smokers to switch to less-risky products, U.S. health officials have so far stuck with an abstinence-only message to the public.Online fact sheets published by the Centers for Disease Control, the Food and Drug Administration and the National Cancer Institute list multiple health risks associated with smokeless tobacco—including cancers of the mouth, esophagus, and pancreas—but give no indication it is less harmful than cigarettes. “There is no safe form of tobacco,” the cancer institute says on its website.
A recent Oxford study predicted that 70 percent of US construction jobs will disappear in the coming decades.
The pressure on legislature to license doesn't come from the public but the members of the occupation. (Milton Friedman). 55 years later two other commentators observe licensing having negative effect on employment (since it restricts access to the field). It's also the case that occupational licensing "widens the gap between rich and poor by squelching employment opportunities at the lower end of the socioeconomic scale, and by inflating the compensation of highly skilled professionals at the top of that scale." (The Captured Economy, How the Powerful Become Richer, Slow Down Growth, and Increase Inequality, by Brink Lindsey and Steven Teles).
No study has been done on degree to which occupational licensing has widened income inequality but we do know that since 1970, the share of workers subject to licensing has jumped from 10% to almost 30%. There are lots of occupations paying reasonably well which people at the low end might normally be able to fill with minimal on-the-job training, but they may be out of reach due to money and time required for the license - beauticians, manicurists, barbers, preschool teachers, athletic trainers, gambling dealers, bartenders, massage therapists, interior designers, and florists.
Those who defend licenses confuse it with branding, meaning branding makes us better-informed consumers. Private market already performs this in various ways, online evaluations for example. The advantage of branding is the market doesn't place restrictions on people's right to enter a field.
Studies of licensing show little connection between quality and licenses. Louisiana requires florists to be licensed which Texas doesn't. An experiment involving florists from both states revealed no difference between floral-arranging skills of the licensed professions vs. unlicensed. That's because licensing is mainly about barriers to entry, not enhancing skill.
The Radio Act of 1927, the brainchild of then-secretary of commerce Herber Hoover, created a regulatory regime for carefully parceling out airwaves according to a "public interest" standard. It was said to be necessary to prevent chaos - "etheric bedlam."
In fact, it was not. Rather, it reflected Washington politics that favored incumbent interests - the first few visionaries who opened radio stations and enjoyed commercial success. The scheme hamstring competition and flummoxed innovators for generations"

