Archive for the ‘IT’ Category

IPC::Shareable sets SIGCHLD to Ignore (I’ll take “Annoying undocumented side effects” for $200, Alex)

Sunday, January 1st, 2023

Just a heads up that hopefully google will index and save someone else from the several hours of digging I’ve just had to do. the perl module IPC::Shareable sets SIG{CHLD} to ignore any time you include it. You can set it back to the default behavior, but until you do, waitpid() is going to return -1 and $? will contain -1 for any pid-waiting you do.

Running VMWare on Dell 7810 / Fatal Error Out Of Resources loading tools.00

Sunday, December 18th, 2022

So, I ran into the dreaded not-enough-memory-below-the-4G-barrrier problem trying to install esxi 6.0 on a Dell 7810. After trying several varients (disabling *everything*, moving all 64 bit PCI to > 4G, etc) I ended up just installing esxi onto the SSD using another dell I had lying around (a 7010) – I suspect any computer would have worked that had UEFI – and then moving the SSD and configuring it for UEFI boot on the 7810, after which it popped right up.

Perl bluetooth communications

Friday, May 20th, 2022

I had a couple of notes on using Net::Bluetooth from a raspberry pi to talk to a Bluetooth serial port because I couldn’t get the example code given with Net::Bluetooth to work.

The following will connect to a mac address and send and receive data from it (in this particular example, a ESP32):


#!/usr/bin/perl

use Net::Bluetooth;
use Data::Dumper;
use IO::Handle;
my $obj = Net::Bluetooth->newsocket(“RFCOMM”);

$addr = ‘C4:4F:33:58:B6:FB’;
$port = 1;

if($obj->connect($addr, $port) != 0) {
die “connect error: $!\n”;
}

my $fh = $obj->perlfh();
$fh->autoflush(1);

sleep(1);

print “sending \n”;

print $fh “V\n”;
print “receiving\n”;

$buf = readline($fh);
print “Fetchhost: $buf\n”;

RabbitMQ websocket URL wrong in documentation

Monday, February 21st, 2022

Just sticking this here in the hopes that it will get listed in google and maybe save some folks a little time.

If you are trying to use rabbitMQ’s websocket STOMP connector, as discussed on https://www.rabbitmq.com/stomp.html, be aware that the URL given in the documentation on this page is wrong (or perhaps only applies to newer versions of rabbitmq).

The correct way to successfully create a websocket to RabbitMQ 3.5.7 (which ships with Ubuntu 16.04) is as follows:


var ws = new WebSocket(‘ws://yourhostname:15674/stomp/websocket’);
var client = Stomp.over(ws);

Later note: The documentation is correct for newer versions of RabbitMQ.

Dell 7810 No Video issue

Tuesday, February 15th, 2022

So, I’ve been buying Dell 7810s for my kitten trader 3.0 cluster, and I thought I’d somehow gotten three bad ones from two vendors. No, actually, Dell thoughtfully stores the slot that the video card is in in the BIOS! Changing the video card for another model results in no video – so, if you have a 7810 that you’ve put a new video card in that won’t display anything, the trick is to remove the battery, short the two pins that would have been the battery together, then power it on – the display will, after about 45 seconds (be patient) and one uncommanded power cycle actually light up with the dell logo and a option to push F2 to enter setup – *immediately* go into setup and select the slot # the card is in under ‘video’. (There will be a helpful hint listing video card type on every slot with a detected video card). It will tell you that on systems with a single video card you can select ‘auto’ but as far as I can tell, this is a lie, or maybe is only true if you use only Dell-approved video cards. If you don’t save this setting the next time you boot you will again have no video.

Most of these systems are destinated to be headless for me anyway so I really only need video long enough to configure them, but it’s still a great help. I hope this helps someone else in the same kettle of fish I was in as it took me 2 hours to figure this out.

Setting a static IP on ubuntu 20.04 with cloud-init

Friday, February 11th, 2022

So, it took me numerous tries, digging, and beating of head against curtin and the like, but I have finally figured out how to set a static IP on a host using cloud-init.

Mind you, I am not talking about setting a static iP for while the installer is running. That’s easy, and well documented. I’m talking about the next time it boots.

The solution requires two bits. They’re pretty straightforward, and both go in the cloud-init file

Bit one goes at the end of the autoinstall section, and deletes the default configuration and writes a permanent one instead. Note that the filesystem is mounted as /target


late-commands:
– rm /target/etc/cloud/cloud.cfg.d/50-curtin-networking.cfg
– mv /tmp/00-installer-config.yaml /target/etc/netplan

Bit two actually writes out the /tmp/00-installer-config.yaml that late-commands will be editing


write_files:
– path: /tmp/00-installer-config.yaml
owner: root:root
permissions: “0644”
content: |
network:
version: 2
ethernets:
ens160:
critical: true
dhcp-identifier: mac
dhcp4: true
ens192:
dhcp4: no
addresses:
– {ipaddr}/16
gateway4: 172.16.1.1
nameservers:
addresses:
– 172.16.5.6
search:
– search.domain

Sunday, October 3rd, 2021

So, I decided this a while ago but I thought I would post it here in case anyone from Adobe is reading.

Adobe casually threw away hundreds of thousands of man-hours of work programming excellent content when they decided not to open-source flash, but rather to deliberately sabotage it in browsers.

I will never buy another Adobe product, and I hope they come to suffer as a company for their destructive attitude.

My response to Robert Reich’s comment on cryptocurrency

Thursday, May 20th, 2021

1) I think it’s a good thing to take money – the power to mint it and control it – out of the hands of government. Crypto also offers the possibility of evolving money in two important directions – #1: we can start tracking metadata for each transaction including real world resources and man-hours – ETH already has the vehicle for this, although it would take getting everyone to understand why it was a good idea to get it implemented #2: We can start using separate types of money for renewable and nonrenewable resources. Cryptocurrency helps open people’s eyes to the idea of ‘multiple types of money’ and could also be a vehicle to help facilitate this. Squishing all types of value into one type of money is resulting in us repeatedly doing stupid things.
2) The large use of energy is something that could easily be rectified. If instead of having all participants constantly hashing and scaling the difficulty needed by the total hashrate, we required participants to *occasionally* hash to prove they *could have* (replace the proof of work with a proof of capability of work) and to hash on demand (allowing the network both to get the hashes it needs to make the blockchain go and also allowing the network to challenge suspected cheaters to prove they really can turn over them hashes) we could reduce power exponentially. The huge power usage is because no matter how many participate, the payout per block is the same – and stupid numbers of people have started participating. We can design the network to still do what it does while using a lot less power than it does.
3) Blockchain technology offers us a lot of awesome possibilities, including the possibility of checking vote aggregation ourselves. So far it’s the wild west on the idea of using it for money/value, but the idea is a good one – governments would likely be much better behaved if we took the power of the purse away from them. This is not saying I don’t believe in funding government operations – but right now, my government is murdering massive numbers of people using my tax dollars, and I feel represented by basically Bernie, AOC, and no one else. Cryptocurrencies offer us the possibility of taking some power away from governments and I think that is a good thing
4) Some cryptocurrencies also use very little power while empowering a new way of building a communications network – I gesture you to Helium.
5) All that said – the future of cryptocurrencies as a vehicle for value is extremely unclear. No one should invest any money in them they can not afford to lose. It is also not at all clear what future cryptocurrencies based on a proof of work that uses hashing have post the advent of large quantum computers.
6) Most of the time I agree with you, but on this one I think you’re probably under informed and acting as a shill for people in power that are frightened – though whether that’s because they *don’t* understand blockchain or whether it’s because they do, I don’t know.

Pipeline Shutdowns, Windows Versions, and dystopias

Thursday, May 13th, 2021

So, I’ve become sufficiently cynical to suspect that the actual running of the pipeline recently shut down by ransomware was done by industrial controllers, and the operators shut it down because they’re very conservative and they hoped they could make the Biden administration et al look bad. IT’s difficult to know, although I do hope this will push massive EV adoption. It would be nice if in their attempt to hold a gun to our head Big Oil committed suicide instead.

What I do know is that the hack occured becuase Microsoft abandons old windows versions. Now, this should be illegal – similar to how car manufacturers are required to provide repair parts for any mass produced automobile, Microsoft should be forced to release the source code for any operating system they abandon so volunteers can continue to maintain it. Linux proves that open-source software is more stable and secure than closed-source anyway.

Now, many people would say “No, you should be forced to regularly “upgrade” (in the case of win 10, downgrade) so Microsoft can continue making a profit. I don’t understand why these people want to live in a dystopia. Being forced to adapt to a change when you’re busy doing something else is clearly dystopian, and there’s also almost no chance that all the makers of (perfectly functional, useful, sometimes very complex and expensive) computer-interfaced hardware are going to manage to get drivers out for each new version Microsoft chooses to create.

Someone was trying to convince me we should nationalize Facebook because they’re upset Trump got kicked off it. No, that’s a horrible idea – my final argument that I would describe as a crushing blow was to ask if we should nationalize all communication infrastructure – should Fox News be nationalized? How is this different from Ganz Deutschland hört den Furher im Volksempfanger? No, I don’t think so. But we probably do need to have greater government oversight of Microsoft given the position operating systems play in our world – and as I said, they should be *forced* – if they want to stay in business in the USA – to release the source code of anything they abandon so it can continue to be maintained.

Let’s *try* to aim for *less* of a dystopia rather than more?

Side note – being forced to ride the upgrade train may be another example of how capitalism encourages us to make really bad decisions. It raises GDP, and our government seems to think a perpetually climbing GDP is a good thing, but it reduces effectiveness and wastes man-hours – it wastes real world resources to make paper ones. Sounds like another great example of the tool using us instead of us using the tool!

The windows 10 nightmare

Wednesday, May 5th, 2021

So, this is a great article that I think sums up why I think windows 10 – and MacOs 11 – are both heading straight into dystopian land. Big corporations believe that it’s their computer, not yours, and thanks to Citizens United, those big corporations own the government as well.

(one of my friends immediately equates me saying this with me being a Trumpian Antimasker who believes the Hollywood Elites and Liberal Academia are responsible for all the ills of the world – and I really don’t think it’s the same thing at all. Trumpanzees and antivaxers believe in things which are *not true* – I believe in something which is *demonstrably* true, which is that Microsoft has placed themselves in a position to install software on your computer without your knowledge or consent and is steadily abusing this position more and more. You *cannot* remove Edge from Windows 10. Nor a whole long list of other applications. Microsoft sincerely believes it is their computer, not yours. Even scarier, in S mode you cannot install Chrome)

At this point I am *hoping* Microsoft screws up in some way which results in bricking millions of windows PCs, because at least that will get the government to notice how scarily dictatorship-like their position is over the desktop market. In the meantime, I will keep running windows 7,