View on GitHub

Quorten Blog 1

First blog for all Quorten's blog-like writings

This is an article on a PayPal bug that exposes your password.

20200114/https://medium.com/@alex.birsan/the-bug-that-exposed-your-paypal-password-539fc2896da9

This is an article on an unfortunate cheater in an AI contest to help a charity.

20200114/https://www.kaggle.com/c/petfinder-adoption-prediction/discussion/125436

This is an ill-informed StackOverflow answer on the question of handling intermittent errors in software.

20200114/https://stackoverflow.com/questions/36827659/compiling-an-application-for-use-in-highly-radioactive-environments

And this is an interesting Wikipedia article on timeline of far future events, in case you are feeling like you’re “having a bad day.”

20200114/https://en.wikipedia.org/wiki/Timeline_of_the_far_future

Jenkins store empty stash

2020-01-15

Categories: jenkins  
Tags: jenkins  

In Jenkins, when you unstash a named stash, the stash must exist or else you will get an error. So, how can you cope with this? Sure, one way is to catch the exception that is raised, but there is yet another way that you can make this work. When storing a stash, add the option allowEmpty: true.

20200114/DuckDuckGo jenkins unstash no such stash
20200114/DuckDuckGo jenkins unstash no such stash no files to stash
20200114/https://issues.jenkins-ci.org/browse/JENKINS-52361
20200114/DuckDuckGo jenkins unstash allowEmpty
20200114/https://jenkins.io/doc/pipeline/steps/workflow-basic-steps/#stash-stash-some-files-to-be-used-later-in-the-build

Send a message to Hipchat using the REST API? What? Are you kidding me? Hipchat has been rendered irrelevant by Slack! Yeah, yeah, I know, but we still have some odd reasons why there are a few stragglers using Hipchat for specialized purposes, so, okay, here’s how you do it. It’s rather quite simple.

20200114/DuckDuckGo hipchat curl
20200114/https://community.atlassian.com/t5/Hipchat-questions/HipChat-cURL-Bold-amp-Colors/qaq-p/596059
20200114/https://developer.atlassian.com/server/hipchat/messages/
20200114/https://developer.atlassian.com/server/hipchat/about-the-hipchat-rest-api/
20200114/https://www.hipchat.com/docs/apiv2/method/send_room_notification/

echo '{"color":"red","message":"Hello, Hipchat world."}' |
  curl -H 'Content-Type: application/json' \
  -H 'Authorization: bearer <token>'
   --upload-file - <hipchat_server>/v2/api/<room>/notification

To get information on a room, such as getting a room ID from a room by name, use this REST API:

20200116/https://www.hipchat.com/docs/apiv2/method/get_room

When searching for information on handling HTTP errors in Jenkins, I’ve found some other unrelated but interesting information on the Ruby lonely operator and exception handling style in Ruby.

20200114/http://blog.travisspangle.com/safe-navigation-operator-or-rubys-lonely-operator/
20200114/http://www.virtuouscode.com/2011/07/05/demeter-its-not-just-a-good-idea-its-the-law/

So, what is the Ruby lonely operator? Basically, it is designated as a way to safely access members when you don’t know if they are defined or not. Then there is the other question about using exception handling to access such member variables. Although at the outset, it seems to be a bad idea, “a code smell,” there are certain circumstances when this can be a good way to do this and a good idea.

Okay, so you’re winding down on your Windows purchases, but you still feel you need that backup option in case you have the need to use Windows for that bespoke software being a straggler on modernizing to modern Unix-like web platforms. So, what’s the best way to approach this? Use Windows primarily as a virtual machine, of course.

The operating system on its own is designed for easy installation into virtual machines. The key, of course, is to make sure you buy the right kind of license key with the necessary options for virtualization. In the basic case, you’re only going to need to run Windows 10 on one device, so you simply need to make sure you’ve got a license purchased for that particular use. In particular, Windows 10 Professional or better is required.

These are the minimum license options that are purchased when you buy Windows 10 Professional:

  • Windows Software Assurance (SA)
  • Windows Virtual Desktop Access (VDA)

Read on →

So, now I’m really excited for the middle-of-January Raspberry Pi 4 upgrade, and guess what? It’s finally here! But alas, I cannot upgrade due to an apt broken dependencies error. Come on!!! What gives? Okay, okay, apparently this is rather common in Raspbian, but no worries, the solution is simple. Just do this with the indicated broken dependencies package:

sudo apt-get install --reinstall vlc-bin

And you’ll be all set to pull in the updates!

20200112/DuckDuckGo raspberry pi vlc-bin broken packages
20200112/https://raspberrypi.stackexchange.com/questions/9050/held-broken-packages

Okay… so I’ve been running my new PoE splitters for a while, and I touch them when working around with the cables and notice they are warm. They are warm… what does that mean? It means that they are wasting energy into heat, literally. Yeah, like the old wall wart power supplies that would feel warm to the touch. Several Watts of energy are being wasted into heat.

Okay, okay, so the question comes down to, what is the typical energy efficiency of PoE splitters? Apparently, it is touted to be around 80%. Okay, when I think about it… yeah, that’s probably right. The PoE splitter itself is smaller than old-fashioned wall warts, which means that if it feels about as warm as the old wall warts, then there is simply not as much heat required to get to that particular warmth. So instead of wasting “several” Watts, maybe only a “few” Watts of energy are wasted. Say, 1 Watt wasted of a 5 Watt power supply is not too bad. Although, if you have low-power equipment, maybe it is really only consuming 1 Watt on its own, so you’re doubling the power consumption due to efficiency losses.

20200110/DuckDuckGo how energy efficient is a poe splitter
20200110/https://en.globtek.com/technical-articles/new-poe-injector-products-for-green-energy-performance

How long will a 40 watt light bulb run on a UPS? This requires a bit of understanding of the proper measures of a UPS capacity.

First of all, Watts and Volt-Amps are not the same! Volt-Amps is a measure of the “apparent load” of a system. The “power factor” is the ratio of actual power consumption to apparent load, which is typically less than one (60% to 85%) for small computers like desktop PCs due to them behaving like “capacitive loads.” Purely resistive loads such as incandescent light bulbs and electric heaters will have a power factor of 1.

So, when a UPS specifies its power capacity in terms of Volt-Amps, you should generally multiply that by 1 / 60% = 1.67 to obtain the actual power rating in Watts that is guaranteed to be available.

To be on the safe side, you can always assume your connected equipment has a power factor of 1 and your UPS power rating in Watts is 60% of the Volt-Amp rating. This will result in an oversized UPS that runs for longer than calculated.

20200110/DuckDuckGo ups how long will a 40 watt light bulb run
20200110/https://www.power-solutions.com/watts-va

For many years over the course of the late 2000s, it felt like Microsoft was really doing nothing to advance their technology. Procrastination? No, it really felt like brinksmanship. This kept going for a few years until they were pounded by the “iron fist” of the rest of the tech industry, a.k.a. “invisible hand.”

Bill Gates pulled out, when he still could have kept going with keeping Microsoft as a business doing well. Some folks might tout, Microsoft was never really necessary in the end, now were they? Well, we can tell them that they wouldn’t have their fancy nancy computers that they have today without such leadership. But is that really true?

At the end of the day, I have to conclude that it’s not. Microsoft’s main accomplishment was in providing a short-term solution that could bridge between the old and the new business worlds. 100% of the thought leadership of today’s modern Internet came from the fringe community, and they’ve literally eaten away anything of value that was left over by the proprietary software culture.

Literally, Adobe helped by simply getting out of the way. Microsoft helped by becoming irrelevant. That is, once they’ve provided the bridge between the old and the new worlds. In that sense, they were pivotal in bringing the old world to the new world.

Move relative symbolic links

2020-01-08

Categories: unix  
Tags: unix  

How do you move relative symbolic links correctly? Normally, the move command just moves the symbolic link file without changing its target. Unfortunately, there looks to be no easy way to do this with default commands. Rather, you must use third-party commands like the symlink -c command to change absolute links to relative, for example. Before moving, you should convert the relative links to absolute links.

20200107/DuckDuckGo move preserving relative symlinks
20200107/https://stackoverflow.com/questions/8523159/how-do-i-move-a-relative-symbolic-link