|
no pictures? I don't believe you. The internet requires cat pictures if anyone claims anything about cats
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
I tried posting in member photos and it's not liking me. Disqus broke their image parking feature as well.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
I figured it out[^]
Here you go[^]
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
lol, that's a furry feline. ty for the pic
Charlie Gilley
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Has never been more appropriate.
|
|
|
|
|
I've got a neighbor feeding the strays. I can't leave my suburban street without seeing 3 cats every time I come and go. Most I've seen from one place was 18...
Hogan
|
|
|
|
|
I had a neighbor who used to feed the strays.
Until the food he left out for them started attracting skunks.
|
|
|
|
|
Over here's it's not cats but bunnies.
The neighbor across the street got expropriated maybe 2 years ago. Earlier this spring a local developer cut down all the trees on his 15 acres.
Since then a rabbit (well, a hare) has been showing up on a semi-regular basis on my lawn. Then 2 days ago I learned that (a) it was a she and (b) she had 3 tiny babies following her, barely 2 inches long.
While they're the cutest thing ever, given how quickly they're known to reproduce, I'm wondering if we're going to end up with a small colony before long.
|
|
|
|
|
Don't fight it. A clowder of cats is cheap entertainment.
I love your cat names. That's the sign of a true cat lover. Among the dozens of cats we've had were two Snowshoe Siamese we called Stir Fry and Chop Sticks.
There are no solutions, only trade-offs. - Thomas Sowell
A day can really slip by when you're deliberately avoiding what you're supposed to do. - Calvin (Bill Watterson, Calvin & Hobbes)
|
|
|
|
|
I have a friend who named her cats Nixon and Reagan which to this day I get a chuckle out of.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
|
Adam Gordon Bell is a great podcaster who investigates the stories behind the code.
I've enjoyed a great many of his podcasts.
This one, where he interviews Jeffrey Snover (creator of PowerShell) is fantastic.
Navigating Corporate Giants Jeffrey Snover and the Making of PowerShell - CoRecursive Podcast[^]
Snover reveals interesting details that, I believe, will open your eyes to why Microsoft has backed certain technologies then left them for dead. Really great insider stuff you're not going to hear anywhere else.
The podcast is also available via Apple Podcasts.
Listent to it while you're working & I'm guessing you'll stop working to focus on it more. ![Roll eyes | :rolleyes:](https://codeproject.global.ssl.fastly.net/script/Forums/Images/smiley_rolleyes.gif)
|
|
|
|
|
Or at the very least, read the transcript. Jeffrey Snover is amazing (even if I hate PowerShell)
TTFN - Kent
|
|
|
|
|
Kent Sharkey wrote: (even if I hate PowerShell
I haven't been a big fan either, but...
1. I can run powershell scripts on my Linux box (Ubuntu 22.04.4 LTS). Kind of amazing
2. When you listen to the podcast (and I know you will) then you will see that for a Windows Admin it is the only solution (so you have to love it if you're over there). You'll discover why that is in the podcast & your head will probably explode (if you didn't already know why)
3. There are some things you can do with PowerShell which are fun, here's one now:
Insert gratuitous personal self-promotion here
Generate a SHA256 for any input text:
param (
[string]$target = $(Read-Host)
)
$stringAsStream = [System.IO.MemoryStream]::new()
$writer = [System.IO.StreamWriter]::new($stringAsStream)
$writer.write($target)
$writer.Flush()
$stringAsStream.Position = 0
$outHash = Get-FileHash -InputStream $stringAsStream | Select-Object Hash
$outHash.hash.ToLower()
Run it like this:
$ pwsh <filename.ps1> "this is my string I want to hash"
Oh, wait that is from my most recent article[^]. ![Roll eyes | :rolleyes:](https://codeproject.freetls.fastly.net/script/Forums/Images/smiley_rolleyes.gif)
|
|
|
|
|
echo "this is my string I want to hash" | sha256sum
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
When I sit in front of a bash shell prompt I feel the entire computer spread out in front of me.
When I sit in front of a Powershell prompt I feel like I'm peeking through a tiny hole into a big confusing mess.
The first Microsoft PC I used had 640K of memory and twin floppy disks. It felt like an amusing toy next to the Sun Microsystems workstation on my desk. Forty years later it still f*****g does!
|
|
|
|
|
Derek Hunter wrote: When I sit in front of a bash shell prompt I feel the entire computer spread out in front of me.
When I sit in front of a Powershell prompt I feel like I'm peeking through a tiny hole into a big confusing mess.
That is a very good way to express the feeling of sys admin in windows versus Linux.
And, that is exactly what Jeffrey Snover literally fought the internal people at MS about.
The other people were like, "no look you can move your mouse and do all that stuff".
Snover was like, "Ok, so you have 100 machines that you need to set a value on as a sys admin and youre going to have the sys admin login to each box and move the mouse to set the value?!!!"
It's a great interview.
|
|
|
|
|
That's a really interesting shell command I had never seen.
Unfortuantely, it is actually not quite generating the correct sha256 hash.
I had to prove it to myself first.
I tried:
$ echo "aardvark" | sha256sum
You get the value: aabbc5c9b7ec8ef2facd0dbee5b3f7f8836b53544583c21894d25ca4cf98a188
That's incorrect.
The correct value is:
cf9c1cb89584bf8c4176a37c2c954a8dc56077d3ba65ee44011e62ab7c63ce2d
Independent Hash Creator: VirusTotal
As a way to prove this I created a file (aardvark.txt) with the word aardvark but no line terminator or file terminator in it and uploaded it to VirusTotal (runs a sha256 on every file it receives) and you can see that it confirms the same output that I get from my PowerShell script at this link[^].
If you look at the top of that page you'll see the value of the word aardvark which is:
cf9c1cb89584bf8c4176a37c2c954a8dc56077d3ba65ee44011e62ab7c63ce2d
The problem with the script you've provided is that it seems to include a \n with the txt that is hashed.
Here's a snapshot of me trying your values[^] and then inputting the value of my aardvark.txt file (which includes no file terminator or line terminator to your script.
I hope you find this as interesting as I do. ![Thumbs Up | :thumbsup:](https://www.codeproject.com/script/Forums/Images/thumbs_up.gif)
modified 12-Jul-24 8:29am.
|
|
|
|
|
We both forgot to put echo -n to suppress the trailing newline.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Thanks, I could not figure out how to get the correct output using that new shell command.
-n For The Win!!!
|
|
|
|
|
|
It is a (built-in) bash shell command (at least here on Ubuntu 22.04.4).
I just tried the certutil on my windows machine and had it generate a SHA256 of my aardvark.txt file and it worked great.
certutil -hashfile aardvark.txt SHA256
SHA256 hash of aardvark.txt:
cf9c1cb89584bf8c4176a37c2c954a8dc56077d3ba65ee44011e62ab7c63ce2d
Thanks for the insight into that one. Really great.![Thumbs Up | :thumbsup:](https://www.codeproject.com/script/Forums/Images/thumbs_up.gif)
|
|
|
|
|
It's not a bash builtin, but it is provided by a standard (default install) package.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Thanks for the clarity on that. I can never tell my built-ins from my packages in the ground. ![Laugh | :laugh:](https://www.codeproject.com/script/Forums/Images/smiley_laugh.gif)
|
|
|
|
|
A couple of quick tricks:
help -d will list all builtins with a (very) brief synopsis
which command will show the executable path for non-builtins
Note that there are some that have a foot in both camps, for example printf
(That one's a bitch - the builtin behaves subtly differently from the external program.)
Just command will run the builtin, specify a path to force the external one, like /usr/bin/command .
...and of course <facepalm>
type -a command
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
raddevus wrote: Listent to it while you're working & I'm guessing you'll stop working to focus on it more
Yep! You were correct! That was an interesting interview. I've bookmarked for future use. Thanks for sharing!
"Go forth into the source" - Neal Morse
"Hope is contagious"
|
|
|
|