Month: June 2020

Deodorant Recipe

I needed a recipe for deodorant that didn’t melt in the summer heat, so I added some beeswax to my normal recipe:

  • 2 oz beeswax
  • 6 oz coconut oil
  • 4 oz shea butter
  • 6 Tbsp baking soda
  • 8 Tbsp arrowroot powder

Melt the beeswax and oils, stir in baking soda and arrowroot powders. Pour into container and stir as mixture cools and thickens.

Apache HTTPD: SSL Virtual Hosts

For quite some time, you couldn’t bind multiple SSL web sites to a single IP:Port combination — this had to do with the mechanics of negotiating an SSL session — the client and server negotiated encryption based on a specific certificate before the server really knew what the client was trying to retrieve. The quick/easy solution was to just add a virtual IP to the box and bind each individual web site to a unique IP address. While this was quite effective in a corporate environment or purely internal network, it was a terrible solution for a set of home-hosted personal web servers — I don’t want to buy four public IP addresses to host four differently named websites. My workaround was to off-port sites no one else would be using (the MQTT WebSockets reverse proxy) and use a reverse proxy to map paths within the family website to the remaining web servers. This page, for instance, is rushworth.us/lisa … which the reverse proxy re-maps to https://lisa.rushworth.us behind the scenes.

With Apache HTTPD 2.2.12 or later built against OpenSSL v0.9.8g or later, you can use Server Name Indication (SNI) to serve multiple SSL websites from a single IP:Port just like you have been able to do with non-SSL sites. Using SNI, the client includes “what they’re looking for” in first message of the SSN negotiation process so the server knows which cert to serve.

In your httpd.conf, indicate that you want to use SNI on an IP:Port combo

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:443

And, optionally, configure one of the named virtual hosts as the default for non-SNI browsers:

SSLStrictSNIVHostCheck off

Now the configuration for your SSL sites can include a ServerName directive. Restart Apache HTTPD, and you’ll be able to access the proper SSL-enabled website without adding virtual IP addresses.

HTML – Multiple Values on Select Option

I needed to pass multiple values with a select option. It’s easily accomplished by setting the value to a JSON string

while ($row = oci_fetch_array($stmt, OCI_ASSOC+OCI_RETURN_NULLS)) {
	echo "<option value= " . json_encode($row) . ">" . $row['STRTYPENAME'] . "</option>\n";
}

And using JSON.parse to pull out the key of the value you need:

jQuery("#selectDivSetType").change(function () {     
    var strTemplateObject = $('#selectDivSetType').val();
    var jsonTemplateObject = JSON.parse( strTemplateObject );
    var strTemplateURI = './templates/' + jsonTemplateObject.STRTEMPLATENAME;
    $('#templateURI').attr("href", strTemplateURI); 
});

jQuery – Changing href When Drop-down Selection Changes

I needed to provide a different template depending on the type of activity selected in a drop-down menu. The following jQuery code gets the template name from the drop-down value and updates the href target.

jQuery("#selectDivSetType").change(function () {     
    var strTemplateName = $('#selectDivSetType').val();
    var strTemplateURI = './templates/' + strTemplateName;
    $('#templateURI').attr("href", strTemplateURI); 
});

Crispy Kale Chips

Krispy Kale Chips

Recipe by LisaCourse: SnacksCuisine: AmericanDifficulty: Easy
Servings

4

servings
Prep time

30

minutes
Cooking time

40

minutes

Ingredients

  • Kale

  • Olive Oil

  • Salt

Method

  • Preheat oven to 400 degrees F
  • Wash kale, dry, and slice
  • Toss kale with olive oil and salt
  • Set convection oven to 325 degrees F and roast for 10 minutes. Turn kale over and roast for another 5-10 minutes

Notes

  • This is a great snack, but I also use it as a crunchy topping on hearty stews.

Exporting Microsoft Stream Transcript — Prettier Output and Error Handling

Updated script available at https://www.rushworth.us/lisa/?p=6854 — and, since copy/paste doesn’t seem to work for everyone, the script is also available as a text file.

I had posted a one-liner to grab the text content of the Microsoft Stream transcript — there’s a good bit of cleanup required to make something professional looking, but I’ve been lazy about it & leave formatting up to the recipient. The one-liner approach fails when it doesn’t encounter a text element where it expects to find one. A more robust export approach creates a Node List containing all of the transcript-line classed elements, then iterates through that list and when the node has a textContent attribute appends that content to a running string value. Printing the running string value produces output that needs minimal reformatting.

Code:

var objTranscriptLines = window.document.querySelectorAll('.transcript-line');
var strRunningText = null;
for(var i = 0; i < objTranscriptLines.length; i++){
    if( objTranscriptLines[i].textContent ){
        var strLineText = objTranscriptLines[i].textContent;
        strRunningText = strRunningText + "\n" + strLineText.replace("Discard   Save","");
    }
}
console.log(strRunningText);

Results:

You *could* strip off the timestamps as well — instead of strLineText.replace(“Discard Save”,””) use (strLineText.replace(“Discard    Save”,””)).substr(8)

Scratch: Changing Variable In Operator

When I needed to change a variable within an operator block, I’d been removing the variable block and adding the right one. Unlike the “change <variable> …” and “set <variable>…” blocks, the little variable name bubbles do not have a drop-down selector. Today, Anya and I were working on our Chicken Keepers games and she right-clicked the little bubble to select a different variable. Totally didn’t realize you could do that.

SDNY – The Continuing Saga

Looks like Trump’s people assumed Lindsey Graham would rubber-stamp Clayton’s nomination to SDNY without, ya know, actually checking in with Graham. Graham, so far, says he’ll follow the standard process of waiting for blue slips from Gillibrand and Schumer.
 
Personally, I give this above even chances of sticking even after someone explains to Trump what a blue slip is. Trump wants the short-term win, but Graham seems to be looking at long-term strategy. Graham is up for reelection this year … but the presidential race will drive turnout. I can’t see Trump voters abstaining in the Senate race … so Graham can afford some voter outrage from the MAGA extremists. Some centrists could find presidential interference off-putting, and conservative Dems and liberal Repubs would constitute the votes actually up-for-grabs. But, beyond Graham’s possible continued tenure — at *some* point, Democrats will be in charge again, and a lot of Senate traditions cede a significant amount of power to the minority. Upend those traditions for a quick win today, you harm yourself in the future.
 

Personal Finance Lesson – Credit Reports

Around 2000, I had a Key Bank account and paid for the “bill payment add-on” — it was like three bucks a month, but beat the late payment charges I’d incur for forgetting to pay bills, so worth it to me. Got transferred to another state where they didn’t have any branches, so I went into the bank and closed my account. They gave me a cheque, closed out the account, and I left to open an account at a nearby bank that did have branches in the state to which I was moving.

Years later, I got denied trying to open a checking account — like I tried to hand a couple grand over to a bank and they said “no thanks”. I’d gone across the street and opened an account with a different bank. Didn’t really think anything about it until I got a letter in the mail saying I was entitled to a copy of my credit report because information in that report had been used to deny me something. I’d never even heard of a credit report! When that credit report arrived, I learned that Key Bank had closed my account but failed to cancel my bill payment subscription (WTF?!?). They proceeded to charge me three bucks a month for years. And charged me a monthly over-draft penalty for having a negative balance. Forty bucks a month for a few years sure adds up! The eventually closed my account and got a judgement against me (in a state I hadn’t lived in for years, and I never gave them my new address because I wasn’t a customer for a few months before I moved). Absolutely refused to pay that — it aged off of my credit report because they didn’t bother to renew the judgement.

So what’s a credit report? There are three different companies (Experian, Equifax, and TransUnion) that keep track of how well you pay your bills. Not bills like the electric bill (unless you don’t pay it and the electric company gets a judgement against you) — loans. Why three? Because capitalism, I guess. If you bought some server and database space and managed to convince thousands of lenders that it was in their interest to let you know about all of their customers, I guess you could be a credit bureau too. A bit like a certificate authority — once you can convince enough people to trust you, you’ve got a viable product.

When you take out a loan, they associate it to your record. They keep track of how much should be paid as well as if you’ve paid it. The idea, for someone who is thinking about extending you credit, is that your past history of repaying (or not) debts is a bit of an indicator of your future repayment history. More importantly, though, it allows potential creditors to judge your income against your known fixed expenses. If you make $1000 a month and don’t have to spend any of it, you’ve got a good bit of disposable income. If you make $1000 a month, but pay $800 in rent … you’re either eating or repaying the loan so not a good credit risk.

I’m sure companies looking to lend money to people pay something to access these credit reports, but these credit bureaus have another line of income — basically using your private information for marketing purposes. Some mortgage lender wants to offer people a loan — they could just send a mailer to everyone in a zip code, but some of those people have already paid off their mortgage. Others are renting the house. A more targeted advertisement would be sent to people with outstanding mortgages — even better, scope to people with either large outstanding mortgages (how much you’re save with a refi!) or small outstanding balances (think of all you could do with a second mortgage!).

Twenty or more years ago, the only way you had free access to the content of your file was after you’d been denied credit. Like happened to me. Since then, federal laws have changed. You can access, online, a copy of your credit report from each credit bureau once a year — this means you can get the Equifax one in January, the Experian one in May, and the TransUnion one in September. Then get he Equifax one again in January. Since the reporting is generally automated, there shouldn’t be much difference between data held in the three companies. Every four months, you’re getting a picture of what these bureaus record about you.

Why would you do this? Like anything, info in the credit report can be wrong. Sometimes they’ll have someone with a similar name linked up to you. Sometimes they’ll just have bad info — an account closure that got omitted or a ‘current employer’ that you haven’t worked for in years. There’s a “dispute” process that you can use to request they fix anything you consider wrong (although they may not consider it work fixing — employer related stuff — or may not agree is wrong). Sometimes you’ll discover someone’s opened an account in your name, racked up a lot of charges, and left you with the bill (i.e. identity theft).

As of Sept 2018, you can freeze your credit report so no one can access it. For free. This helps avoid unauthorized parties opening credit accounts under your name and should prevent your info from being used to make you the target of lender advertising.  Freezing your credit file restricts who can access the information — which means you have to unfreeze your file whenever you want to apply for credit. It’s an extra step, but how often are you actually applying for a loan? And the credit bureaus need to unfreeze your file within an hour of your online request … so it’s not a big inconvenience. To freeze your file, you must submit individual requests to Experian, Equifax, and TransUnion. You can ‘thaw’ your file temporarily when you know you’re submitting a credit application — I usually unlock my file for a few weeks to ensure delays in data processing don’t mean my application gets processed against a frozen file.

You can also freeze the file of your kid who is under 16 — a great thing for most kids who absolutely are not applying for credit! But the credit bureaus don’t make it that easy to freeze a kids file — Experian and Equifax have a request form, TransUnion wants a letter requesting a “protected consumer freeze” on the specified individual. In each case, you’ve got to include copies of identifying info — your ID, your kid’s birth certificate, and your kids social security card kind of stuff.