I, the physically and/or morally hideous human inhabitant, love to read, play bass and day dream far, far to much...
3,486 words
https://human-inhabitant.com/

Getting MEAN with Mongo, Express, Angular, and Node

I just finished reading the entire book.

Getting MEAN with Mongo, Express, Angular, and Node

By: Simon Holmes
Read On: O'Reilly
In Paperback: 440 pages
Publisher: Manning Publications (December 1, 2015)
ISBN-13: 978-1617292033

I swapped Google maps for OpenStreetMap's using leaflet.js, it's my anti-google-isms.

You won't be able to use MongoLab's much longer, I used MongoAtlas to connect to Heroku... worked fine. Also geoNear has changed so that was a bust, I got it working but not as the author intended, I fiddled far to long on that section.

All and all I love Manning books, always so thorough, great read if you're in the reading zone.

No git repo for this one, I used Mr. Holmes' as they were in easy to pull branches.

Full Stack JavaScript Development With MEAN: MongoDB, Express, AngularJS, and Node.JS

I just finished reading the entire book.

Full Stack JavaScript Development With MEAN: MongoDB, Express, AngularJS, and Node.JS

by Colin J Ihrig, Adam Bretz
Read On: O'Reilly
Paperback: 320 pages
Publisher: SitePoint (January 6, 2015)
ISBN-13: 978-0992461256

The journey through the 90's was probably unnecessary, as I lived it, so.... lets get to the MEAN stack.

The npm link thing was cool, I have never used it before, I guess you know now why I am reading all these books.

Funny how people always assume a zip code can be of type number, cleary these authors' are not from the US New England states. I really laughed when I saw the employees.json.

Chapter 6 was a fail... the else in index.js doesn't actually serve files. I had to "assume" so had to alter the else like so:

// From...
} else {
    // try to send the static file
    res.writeHead(200);
    res.end('static file maybe');
}

// To...
} else {
    // Try to send the static file
    res.writeHead( 200 );
    staticFile( req.url, res );
    //res.end( 'Static file maybe...' );
}

Seems to work... not sure it was the authors' intent though.

The authors' are also serving CSS as a text/plain MIME type... but that is just me pondering the details. To me an author has the same duty as a teacher, they have a responsibility to their readers, as students, and should be held to a higher standard.

In the end there was a lot of great material, but just as many holes going from chapter to chapter. That is what you get for reading an old tech book, my attempts are duly logged.

I think I need to look to books for each topic as a standalone... from books not more than a year old.

MEAN Web Development

I just finished reading the entire book.

MEAN Web Development

By: Amos Q. Haviv
Read On: O'Reilly
In Paperback: 354 pages
Publisher: Packt Publishing (September 25, 2014)
ISBN-13: 978-1783983285

Yet again, in Internet years this is a classic, lots of the utilities he used are no longer the "in thing" Bower comes to mind. But he covers a lot of ground regarding the do's and don'ts of MEAN development and testing, a large focus on code organization and modularization was probably best read in 2014.

A lot of the testing was a bear to get up and running, Gulp has changed some too. I did some read throughs, on sections I was not interested in but I did read it completely... my attempts are duly logged.

Cognos - Adding jQuery

First off, there are many ways to do this, this is just my thing. I am using Cognos 10.2.2 this method will give you the jQuery library under both report prompt and report pages. I do it this way purely to avoid messy code pasting in HTML elements all over a report (very ugly).

Warning: After a fix pack update, you'll need to reapply, but well worth the trouble. If you build JavaScript API's for Cognos you could embed them similarly.

Location of the jQuery file is up to you, I've placed it in a skin, linked it to a CDN, both have their ups and downs. For this article, I am placing a copy in the webcontent root, right along side cognoslaunch.js.

So get your copy, code.jquery.com, drop it in the directory. I am using Windblows for this article and my install is in the drive root not the default location.

[drive]:\c10_64\webcontent

Okay, now how to get it into your reports, open the following file p_include_main.xsl.

[drive]:\c10_64\templates\ps\prompting\p_include_main.xsl

Navigate down to like line 693, insert the following after the closing </script> tag (a new line, 694). I add the comments so I can find it later, not required but... if you make a lot of edits to existing .xsl, .xml and .xts files like I do, it helps.

<!-- :Human: -->
  <script src="{$webRootURI}/jquery-3.5.1.min.js"><xsl:text>/**/</xsl:text></script>
  <script src="{$webRootURI}/some/path/api.human.js"><xsl:text>/**/</xsl:text></script>
<!-- //:Human: -->

It's an invasive edit, so you'll need to restart Cognos. The only other caveat is you'll need to do the jQuery.noConflict(); thing when writing scripts in your prompts and reports, which I usually embed in my API.

I use jQuery along side the Cognos Prompt API all the time, report writers always want kooler reports...

Star Trek: Discovery

So... I did the two season binge.

I first have to say... it is the woman's lib century of Star Trek. The female/male cast is about three to one, the entire bridge cast was made up of woman (with the exception of Spock, Christopher Pike, Gabriel Lorca, Voq / Ash Tyler and two minor role bridge stations). The Klingon empire was ruled by a woman, L'Rell, the parallel universe's Terran Emperor, Philippa Georgiou, was also a woman, the Star Trek Admiral, Admiral Cornwell, yep... female. Most of the episode main "guest characters" were also female.

Two of the main character male roles were... a couple... so not the best male role for some of us Bible readers/believers (Leviticus 20:13, 1 Corinthians 6:9 , Romans 1:26-27).

It was very feminine, lots of tears, all sorts of wishy-washy feelings. Michael Burnham's (don't let the name fool you, female too) character was at times annoying. She went from so exceptional as to be intimidating, to a helpless second guesser. The show actually has nothing to do with the Starship Discovery... the actual title should have been Star Trek: The Burnham Years.

But in the end I am a Trekkie, and though I complain, I loved every scene... I love the historical items they pulled out of the "Trek Universe".

Can't wait for season three.

Linux... anyone?

This is a WIP... and very opinionated, don't read too much into it.

I have tried many many distros, but I always came back to Ubuntu, until I found Linux Mint. I seem to be an Xfce fan... Linux Mint's release of it anyway.

My curent install...

human@listed:~$ cat /etc/*release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=20
DISTRIB_CODENAME=ulyana
DISTRIB_DESCRIPTION="Linux Mint 20 Ulyana"
NAME="Linux Mint"
VERSION="20 (Ulyana)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 20"
VERSION_ID="20"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.ubuntu.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=ulyana
UBUNTU_CODENAME=focal

My cheesy aliases...
I get a lot of grief for the dist-upgrade trigger... there is nothing on my machine soooo critical that a catastrophic failure would scare me. I'd just build another machine/drive... I learned the art of backup in 1999 well before the advent of Timeshift.

human@listed:~$ cat ~/.bash_aliases
alias ll='ls -lahF --color=auto'
alias pw='pwgen -ysB1 16'
alias cls='clear'
alias update='sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade'
alias vpn='sudo protonvpn'

Some kool utilities...
pwgen generates passwords which are designed to be easily memorized by humans, while being as secure as possible.

Unless you use a few flags...

human@listed:~$ pwgen -ysB1 16
H(?E<xL<7`Ew&oyz

free displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel.

human@listed:~$ free -ht --si
              total        used        free      shared  buff/cache   available
Mem:            31G        7.1G        4.9G        1.6G         19G         22G
Swap:          975M          0B        975M
Total:          32G        7.1G        5.9G

bashtop is a resource monitor that shows usage and stats for processor, memory, disks, network and processes.

I ❤️ BashTOP... I run it constantly to help monitor my Tor bridge.

human@listed:~$ sudo bashtop

iftop listens to network traffic on a named interface, or on the first interface it can find which looks like an external interface if none is specified, and displays a table of current bandwidth usage by pairs of hosts.

Also run to monitor my bridge...

human@listed:~$ sudo iftop

Speaking of my Tor bridge, the one other monitor thing I do is using tail. It's a bit lame but does what I need it to do.

human@listed:~$ tail --follow=name /var/log/syslog | grep "Tor\["
Sep 11 07:34:28 bridge-name Tor[846]: Performing bandwidth self-test...done.
Sep 11 13:33:20 bridge-name Tor[846]: Heartbeat: Tor's uptime is 5:59 hours, with 24 circuits open. I've sent 1.96 GB and received 1.99 GB.
Sep 11 13:33:20 bridge-name Tor[846]: Heartbeat: Accounting enabled. Sent: 6.26 GB, Received: 6.33 GB, Used: 6.34 GB / 32.00 GB, Rule: max. The current accounting interval ends on 2001-09-11 19:57:00, in 6:23 hours.

Write Modern Web Apps with the MEAN Stack: Mongo, Express, AngularJS, and Node.js

I just finished reading the entire book.

Write Modern Web Apps with the MEAN Stack: Mongo, Express, AngularJS, and Node.js

By: Jeff Dickey
Read On: O'Reilly
In Paperback: 246 pages
Publisher: Peachpit Press (October 5, 2014)
ISBN-13: 978-0133930153

Clearly, in Internet years this is a classic, lots of the utilities he used are no longer the "in thing" Bower comes to mind. But he covers a lot of ground regarding the do's and don'ts of MEAN development and testing, was probably best in 2014.

A lot of the testing was a bear to get up and running, Gulp has changed some too. None the less I read it... my attempts are duly logged.

Star Trek: Picard

So... I finally got to see it... I binge-d the entire season back to back. The 'ole "CBS All Access" trial period, but I feel I may need to purchase a month subscription, just to binge Star Trek: Discovery.

Not at all what I expected, I did love all the cameos, Brent Spiner as Data, Jonathan Del Arco as Hugh, Jonathan Frakes as William Riker, and Marina Sirtis as Deanna Troi, as well as Star Trek: Voyager's Jeri Ryan as Seven of Nine (she was awesome, as usual). To be honest, it dragged a bit getting started. Picard's quarters/vineyard holo' was lame... you are on a ship for crying out loud... get off the farm!

Note: The cast... has been around for a while... that may account for the sloooow start up.

Seeing Seven of Nine and a transformed Borg ship was the highlight for me (she is still so bad ass). Picard being greeted as Locutus by the reclaimed Borg, XB's, was a bit over acted. Brent Spiner's multi-aged/persons roles was actually pretty good (thankfully there was no sign of Lore).

But I'm a Trek fan since days of James Tiberius Kirk, so I was hooked. They even mentioned a Deep Space platform... Deep Space Twelve, that brought it full circle for me.

Sadly, I figured out how the whole thing was going to end about 15 minutes into the final episode... 😞 really pissed off the wife, I should learn not to announce my opinions during initial screenings (I won't spoil it for you though).

Let see how season 2 goes... fingers crossed.

Privacy...?

This is a WIP... and very opinionated, don't read too much into it.

I am a privacy advocate; I use applications with that in mind, as much as I possibly can. What is most baffling to me is, in the US, it is illegal to mess with mail. Yet it is ok for Google to parse your email, to me, snail mail and email are... and should be... considered equally confidential. The fines should be one and the same.

In light of issues like email, chat and cloud storage I opt to use some of the following:

Vendor My Two Cents
📧 Tutanota My main email provider, via my own domain. Super easy to use and has a decent desktop/mobile app. But... unfortunately, privacy comes at a price. I am currently paying €72 per year... including taxes 😔
📧 ProtonMail Also super easy to use and also has a decent mobile app. Though I use Tutanota as a primary email source, in my eyes ProtonMail's UI is far superior...
📧 StartMail Have been with them for years... but still no mobile app. Kind of a back burner email provider for me now. Then there is this... and they pay Google, so not really a de-Googling venture for me.
📧 Posteo Bit of an overkill email service as it based on Roundcube, affordable but this too has no mobile app. I am just letting my euro's run out at this point.
🔐 Bitwarden I am currently using Bitwarden, but I am always leery of any cloud based product. Open source or not...
🔐 KeePassXC A bit of a nuisance on multiple platforms, syncing sucks.
🔐 Encryptr Was my fave... but development is dead, was one of the reasons I dropped SpiderOak One.
💬 Signal My current default messaging app, even have the wife using it. The PIN thing was bloody obnoxious!
💬 Keybase Love the idea of Keybase, I just don't know enough encryption minded people to use it... (sighs).
💾 Tresorit I use this on multiple platforms BUT... crazy expensive $125.00 a  year, 505GB of space.
💾 Keybase Again, love the idea of Keybase, I just don't know enough encryption minded people to use it... (continues to sigh).
💻 Brave The Tor private mode is killer. I still can't help feeling like it is still Google based, and the whole BAT thing is a bit wonky, but blocks adds like no ones business.
💻 Firefox I like the idea of the Monitor and Lockwise features, even though apps like these still kinda make me paranoid... Lockwise doesn't even export... yikes.
💻 Tor Browser For the super paranoid... those who disable JavaScript.
💻 ungoogled-chromium I'd use it more but some extensions don't install... Bitwarden comes to mind...
🔍 DuckDuckGo I stopped using Google search years ago... I don't even !g anything. The browser extension must be good, as my companies corporate policy forces me to remove it (there is NO privacy in a corporate environment, don't let them tell you otherwise).
🛡️ PIA (Private Internet Access) Note Log-less VPN's are a myth:
Best bang for your buck, easy to install on Linux and Windblows... I always run with VPN killswitch engaged. I do run into multiple sites that block me now though. PIA stopped accepting blocked IP reports, so I either find another compatible site or if desperate disable the VPN.
🛡️ ProtonVPN Note Log-less VPN's are a myth:
Not to bad, though set up on Linux is not for the faint of heart, often fails an ipleak.net test... and lots of people block ProtonVPN, even some Linux repositories.
📱 /e/ If only the pre-made phones were sold in the US... (twiddles thumbs... waiting). I do have an old Pixel 2 XL hanging around... I should flash it. Lots of hype... but they obviously dislike Americans, you got to be adb savvy to enjoy one of these in the US.

Smoothie

Strawberry & Banana Smoothie

The wife and I have one almost every morning to start the day... it is Zone Diet based. It's super simple, check it out (2 servings).

Measure Stuff Blocks Single Block Considered
2 tbsp Almond Butter 6 1 tsp fat best
2 Small Bananas 6 1/3 carb poor
8 Medium Strawberries 2 1 cup carb good
2 Cups 1% Milk 2 1 cup protein best
18 Grams Zone Protient Powder 2 9 grams protein

So you know what is right and true, here is the low down:

The Zone Diet is based upon having the right balance of three macronutrients – protein, carbohydrate, and fat at every meal and snack. This allows you to reach the desired health benefits that come from being in the Zone. Zone Food Blocks are simply a measurement used to define how much of these macronutrients you should be eating throughout the day. Each Zone Food Block consists of one block of protein, one block of carbohydrate and one block of fat. To get the desired balance your goal should be to have a 1:1:1 ratio of protein, carbohydrate, and fat blocks at every meal and snack. The average female eats 11 blocks each day and the average male 14 blocks each day.

So... considering a true "Zone" ratio. This way out in left field... but made with love and to taste. I look forward to making them every morning, helps swallow the pills.

human@listed:~$ whoami

Some kool places you may find me...

Keybase | GitHub | ! LinkedIn | ! Mastodon | ! Twitter | ! Facebook

Some details...

Conceived in Germany... born in the US... the year... 1965. Age... you do the math.

I am a privacy advocate and continually work to de-Google myself... code tinkerer... Tor patron... and a self taught full-stack developer, I have been coding/developing since the year... 2e3. My current position includes Java, Groovy, JavaScript, old AngularJS, Jest, MSSQL and MySQL, working with thousands of lines of legacy spaghettification (that they are trying to fix overnight).

Remember Classic ASP with Microsoft Access backends...? I do.
Remember framesets and using tables for layout...? Yep, me too.
Remember the whole XHTML push and fail...? That's right, me too.

My primary joys these days are God (theology), my lovely wife Patti, our dog Muffin, linux, JavaScript (ES5, ES6-isms), PHP and metal bass (the 🟟 not the fish), in that order... actually.

My somewhat controversial music taste... Spiritbox, Jinjer, TesseracT, Periphery, Heart Of A Coward, Infected Rain... I could go on and on, but you get the gist...

const fact = ( later === never );

Rebuilt My Old ThinkStation

So I rebuilt my old clunker today, well actually started yesterday with an autonuke from an old DBAN disk I have. I ran it thrice... the old girl is a:

Lenovo ThinkStation P310  
Intel Core i7-6700 CPU @ 3.40GHz   
32GiB System Memory

I know... it's a clunker compared to you kool kids.

I am a Linux Mint Xfce junkie. I did a clean install of Linux Mint 20 "Ulyana" - Xfce (64-bit). Timeshift help keep a backup of those "just in case I needed" files... I did not use it to do a restore just to access old files.

First thing I set up was ProtonVPN, killswitch engaged, love the linux-cli for setup, makes it super easy. I have used PIA for years but the whole Kape Technologies acquisition has me a little unnerved. As soon as my subscription runs out it'll be removed from a few Windblows machines I have.

In the beginning...

So I wanted to try the whole Standard Notes Listed 'blog thing. I am not a blogger by any sense of the word, but I liked the quasi anonymity of doing it this way.

Written entirely in HTML... to see if it sticks. Unfortunately, spellcheck doesn't work in the Code Editor, so I am in Plain Text Bold Editor mode, 'cuz I can't spell. It has an HTML button, so I can still write in HTML and spellcheck.

Note: I actually jumped to the Markdown Pro editor, then toggle to Plain Text to spellcheck. Listed supports Markdown but not the ~~strike through~~ I had to use <del> tags.

Looks like <style> tags are ripped out so I have to contend with inline styles (such an ugly approach). I guess I should have read the help section first.

Now that I figured out how to use CSS, I can't leave it alone. The developers kept it really simple, makes it a breeze to manipulate. Only a single break point which is nice too.

@media (max-width: 767px) { /**/ }
@media (min-width: 768px) and (max-width: 991px) { /**/ }

Funny... when you go to the Listed site... there is a 100 day writing challenge, dated May 8th, 2019, I guess I missed it... if I was doing it... #100Days this would be day 001.