ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Topics
    2. Obsolesce
    3. Posts
    • Profile
    • Following 0
    • Followers 3
    • Topics 152
    • Posts 9,418
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Return Values in Bash Script and generate e-mail which shows successes, errors and if the directory is empty

      @wirestyle22 said in Return Values in Bash Script and generate e-mail which shows successes, errors and if the directory is empty:

      @stacksofplates said in Return Values in Bash Script and generate e-mail which shows successes, errors and if the directory is empty:

      @wirestyle22 said in Return Values in Bash Script and generate e-mail which shows successes, errors and if the directory is empty:

      @stacksofplates said in Return Values in Bash Script and generate e-mail which shows successes, errors and if the directory is empty:

      Rather than mess with multiple arrays, you can just have a single dictionary that holds the file and status. A single function can decrypt the file. Then just save the file name and status of the decryption in that dictionary. Then loop through the dictionary and here I just print the data, but you could email it or send to Slack or whatever.

      This was a quick pass so probably can be cleaned up a bit.

      My reasoning behind two arrays was to keep it organized. If I do all successes in one and then all failures in the other. So I have this now:

      #!/usr/bin/env bash
      source "/home/user1/subdirectory1/master.sh"
      decryptedFolderPath="/home/user2/subdirectory2/"
      archiveFolderPath="/home/user1/subdirectory1/archive/in/"
      extension=${fileName##*\.}
      newFileName=${fileName%.*}
      fileWithoutTimestamp="$newFileName.$extension"
      encryptedItems=$(ls encryptedFolderPath*.pgp)
      statusArray=()                                   
      
      for i in $encryptedItems
      do
      gpg --batch --homedir /home/user1/.gnupg/ --passphrase "$PASS" --list-only --list-packets --yes --decrypt "$i" | grep -q "encrypted" > "$decryptedFolderPath"/"$fileWithoutTimestamp"
      outPut=$(gpg --batch --homedir /home/user1/.gnupg/ --passphrase "$PASS" --list-only --list-packets --yes "$i" | grep -q "encrypted")
      
      if [ $? != 0 ]; then
      echo "$i is not a pgp file"
      statusArray+=("failed to decrypt $i, with status code $? output from pgp: $outPut")
      fi
      
      if [ $? == 0 ]; then
      statusArray+=("Succesfully Decrypted $i")
      echo ${#statusArray[@]} | mail -s 'report' [email protected]
      v=${i%.*}
      encryptedFile="$v"
      fileName=${encryptedFile##*/}
      @@ -27,4 +34,4 @@ continue
      fi
      done
      
      mv "$i" "$archiveFolderPath"
      

      I think this is what you meant, right?

      Well no. I meant Python can easily work with dictionaries (hash maps) vs doing multiple arrays. You'd have to switch to a hash map in Bash vs the multiple arrays.

      Gotcha. Yeah it sounds more convenient it just going to take me more time to learn than I have with this current script

      Isn't this the one you've been working on for like a year now? I'd say that's enough time to learn a little about scripting.

      posted in IT Discussion
      ObsolesceO
      Obsolesce
    • RE: Return Values in Bash Script and generate e-mail which shows successes, errors and if the directory is empty

      What do you think @IRJ ?

      posted in IT Discussion
      ObsolesceO
      Obsolesce
    • RE: SAMIT: IBM Is Killing Off CentOS

      @JaredBusch said in SAMIT: IBM Is Killing Off CentOS:

      @scottalanmiller I just installed Ubuntu 20.10 Desktop last night. I felt so dirty.

      Why?

      posted in Self Promotion
      ObsolesceO
      Obsolesce
    • RE: At Least 30,000 U.S. Organizations Newly Hacked Via Holes in Microsoft’s Exchange

      @JaredBusch said in At Least 30,000 U.S. Organizations Newly Hacked Via Holes in Microsoft’s Exchange:

      @Obsolesce said in At Least 30,000 U.S. Organizations Newly Hacked Via Holes in Microsoft’s Exchange:

      Wow that's a lot of companies. If they aren't keeping Exchange Server updated of all things, image all the other software they are likely running out of date too!!!

      This hack had nothing to do with servers up-to-date. It was a zero day. There was no patch prior to March 2.

      It said thousands of servers are still being compromised daily since the patch was released. I imagined that companies not patching something as serious as this likely have so much else not patched, because of either not caring or lack of awareness of this kind of thing.

      posted in News
      ObsolesceO
      Obsolesce
    • RE: At Least 30,000 U.S. Organizations Newly Hacked Via Holes in Microsoft’s Exchange

      Wow that's a lot of companies. If they aren't keeping Exchange Server updated of all things, image all the other software they are likely running out of date too!!!

      posted in News
      ObsolesceO
      Obsolesce
    • RE: Ipad guru for Site connectivity issue

      @DustinB3403 said in Ipad guru for Site connectivity issue:

      Tomorrow's follow-up "Resume critique"...

      I'd fire you for talking to me like

      @WrCombs said in Ipad guru/ Site connectivity issue:

      can I finish what I was saying so I can help you?

      Just because something may be supported, doesn't imply that it is support.

      posted in IT Discussion
      ObsolesceO
      Obsolesce
    • RE: Miscellaneous Tech News

      @JaredBusch said in Miscellaneous Tech News:

      @Dashrender said in Miscellaneous Tech News:

      The price versus promised speed didn’t seem worth it to me compared to my cable option...

      For people with options, it generally is not. But there are large parts of the US where there are not good options.

      This can potentially open the doors to SaaS offerings for SMBs limited to on-prem solutions due to 3rd world level internet access.

      posted in News
      ObsolesceO
      Obsolesce
    • RE: LastPass Goes As Predicted Like LogMeIn

      @scottalanmiller said in LastPass Goes As Predicted Like LogMeIn:

      @Dashrender said in LastPass Goes As Predicted Like LogMeIn:

      According to something else I heard - LP was spending more money supporting free users than paid ones. I can understand them not wanting an upside down business.

      That's not upside down, that's a loss leader. Very different things. It's quite normal for marketing to cost more than support in a business.

      Yup, if there's a free version to a paid product, marketing is exactly what it is.

      posted in News
      ObsolesceO
      Obsolesce
    • RE: LastPass Goes As Predicted Like LogMeIn

      If I'm going to be paying for a password manager, I may as well pay for LP since it has all the features and good to haves that we need. All the others seem to have at least one catch to them, but otherwise no reason for me to pay for them over LP.

      posted in News
      ObsolesceO
      Obsolesce
    • RE: Fry's Computer Store Chain Now Defunct

      @scottalanmiller said in Fry's Computer Store Chain Now Defunct:

      https://arstechnica.com/information-technology/2021/02/frys-electronics-is-no-more-and-all-30-stores-will-soon-close/

      All Fry's stores have closed across the US. No warning to employees, they just closed.

      Gotta say, I'm happy about this. They have a big presence here and these businesses were crooks. They ran warranty scams, would have fake sales, and sell beat up used products claiming that they were new. Everything about the shopping experience there was icky and dishonest. I'm very glad that they aren't around to mistreat people who don't know how to protect themselves. This opens space in the market for good companies like Microcenter to fill the void.

      We got a few things there, DSLR camera (used and great price), a TV, monitor, vacuum, and other random things. All was a good experience. The TV had some weird Bluetooth issues, but because we had the warranty, they sent someone out to fix it a couple times till they got it right.

      posted in News
      ObsolesceO
      Obsolesce
    • RE: Miscellaneous Tech News

      @mlnews said in Miscellaneous Tech News:

      Musk: Starlink will hit 300Mbps and expand to “most of Earth” this year

      SpaceX CEO teases higher speeds, lower latency, and near-global coverage.
      Starlink broadband speeds will double to 300Mbps "later this year," SpaceX CEO Elon Musk wrote on Twitter yesterday. SpaceX has been telling users to expect speeds of 50Mbps to 150Mbps since the beta began a few months ago. Musk also wrote that "latency will drop to ~20ms later this year." This is no surprise, as SpaceX promised latency of 20ms to 40ms during the beta and had said months ago that "we expect to achieve 16ms to 19ms by summer 2021." It sounds like the speed and latency improvements will roll out around the same time as when Starlink switches from beta to more widespread availability. Two weeks ago, Starlink opened preorders for service expected to be available in the second half of 2021, albeit with limited availability in each region.

      Can't get Starlink here until 2022. Not that I need it now, just saying. 300Mbps is around or a little higher than what I get now for free.

      posted in News
      ObsolesceO
      Obsolesce
    • RE: YAML terminology and Ansible

      @Pete-S said in YAML terminology and Ansible:

      @Obsolesce said in YAML terminology and Ansible:

      @Pete-S said in YAML terminology and Ansible:

      Other than that it doesn't matter to me what anyone calls it.

      You are 100% to call it whatever you want. But a key/value pair is commonly referred to as a dictionary... or a hash table which is a dictionary data type. This isn't exclusive to Python in the least.

      "Commonly referred" depends on the programming language in question. For example in many other languages it's commonly called an array or collection and never a dictionary.

      If you look at the part you quoted, YAML calls it mappings.

      The proper computer science terminology would be associative array.
      https://en.wikipedia.org/wiki/Associative_array

      The best thing to do is to call it exactly what the language or software you are referring to calls it. If Ansible wants you to create what it has named in their documentation as a dictionary in YAML, that's what you refer to it as. Otherwise, someone who is familiar with Ansible and it's documentation won't know what the hell you are talking about if you call it your own thing.

      posted in Training
      ObsolesceO
      Obsolesce
    • RE: YAML terminology and Ansible

      @Pete-S said in YAML terminology and Ansible:

      Other than that it doesn't matter to me what anyone calls it.

      You are 100% free to call it whatever you want. But a key/value pair is commonly referred to as a dictionary... or a hash table which is a dictionary data type. This isn't exclusive to Python in the least.

      posted in Training
      ObsolesceO
      Obsolesce
    • RE: YAML terminology and Ansible

      @Pete-S said in YAML terminology and Ansible:

      @Obsolesce said in YAML terminology and Ansible:

      @Pete-S said in YAML terminology and Ansible:

      According to the YAML spec there is no such a thing as a dictionary. That is python terminology, not YAML. Every programming language calls it a different thing like a collection, map, associative array etc.

      So if you want to be precise you should look at the YAML spec.

      We'll what do you know, right there in the 3rd paragraph of the YAML spec, they refer to it exactly as hashes/dictionaries....

      Why bother to comment on something you know nothing about?

      I comment because I know it's called a dictionary in Python and dictionary is not a universal name.
      And YAML is programming language agnostic. Other than that it doesn't matter to me what anyone calls it.


      3.1.1. Dump

      Dumping native data structures to a character stream is done using the following three stages:

      Representing Native Data Structures

      YAML represents any native data structure using three node kinds: sequence - an ordered series of entries; mapping - an unordered association of unique keys to values; and scalar - any datum with opaque structure presentable as a series of Unicode characters. Combined, these primitives generate directed graph structures. These primitives were chosen because they are both powerful and familiar: the sequence corresponds to a Perl array and a Python list, the mapping corresponds to a Perl hash table and a Python dictionary. The scalar represents strings, integers, dates, and other atomic data types.

      3rd paragraph of the YAML spec, go to the introduction, 3rd paragraph down....
      e991ea0c-421a-4e20-954a-836f477fe674-image.png

      posted in Training
      ObsolesceO
      Obsolesce
    • RE: YAML terminology and Ansible

      @Pete-S said in YAML terminology and Ansible:

      According to the YAML spec there is no such a thing as a dictionary. That is python terminology, not YAML. Every programming language calls it a different thing like a collection, map, associative array etc.

      So if you want to be precise you should look at the YAML spec.

      We'll what do you know, right there in the 3rd paragraph of the YAML spec, they refer to it exactly as hashes/dictionaries....

      Why bother to comment on something you know nothing about?

      posted in Training
      ObsolesceO
      Obsolesce
    • RE: What do you use to manage multiple Linux servers?

      @DustinB3403 said in What do you use to manage multiple Linux servers?:

      imitation

      But, that still doesn't imply that it is support.

      posted in IT Discussion
      ObsolesceO
      Obsolesce
    • RE: What do you use to manage multiple Linux servers?

      @DustinB3403 said in What do you use to manage multiple Linux servers?:

      @black3dynamite said in What do you use to manage multiple Linux servers?:

      @travisdh1 said in What do you use to manage multiple Linux servers?:

      Ansible and salt are my first two choices. Cockpit can work as well, but not as easily centrally managed.

      Fedora gets all the love when it comes to having the latest version of Cockpit too.

      Technically you could install the latest version of Cockpit on any distro.....

      Just because something may be supported, doesn't imply that it is support.

      posted in IT Discussion
      ObsolesceO
      Obsolesce
    • RE: YAML terminology and Ansible

      @marcinozga said in YAML terminology and Ansible:

      And why would you care about terminology? Do you intend on teaching Ansible?

      It's not just about Ansible, the same basic YAML is used to define YAML based CI/CD pipelines, and it's very helpful to know the proper terminology and syntax. There are may use cases besides Ansible playbooks.

      Some of the basic syntax is similar in others such as JSON, as well as scripting languages. For example, maybe you're familiar with hash tables in PowerShell? It's all connected.

      posted in Training
      ObsolesceO
      Obsolesce
    • RE: Defective Laptop - how to get browsers bookmarks

      @notverypunny said in Defective Laptop - how to get browsers bookmarks:

      if you plug the drive into another windows machine it's supposed to prompt for the bitlocker key. Haven't had a chance / reason to test it out though.

      Yes, anything that can read bitlocker encrypted drives will prompt you for the key.

      posted in IT Discussion
      ObsolesceO
      Obsolesce
    • RE: Obtaining hardware from terminated remote employee

      @Dashrender said in Obtaining hardware from terminated remote employee:

      @scottalanmiller said in Obtaining hardware from terminated remote employee:

      @Pete-S said in Obtaining hardware from terminated remote employee:

      @stacksofplates said in Obtaining hardware from terminated remote employee:

      @Pete-S said in Obtaining hardware from terminated remote employee:

      @StorageNinja said in Obtaining hardware from terminated remote employee:

      @JaredBusch said in Obtaining hardware from terminated remote employee:

      Hardware is not worth the fucking time to get back.

      If the company thinks wasting man hours on that is a good idea the company is insane

      While I largely agree, our R&D laptops are ~2-3K a pop. (fully max spec' MPB or XPS with onsite repair agreements).

      I did hear we have started on the Mac's using DEP, so the device will auto-enroll in MDM even if the device is wiped.
      https://support.apple.com/en-us/HT204142

      Makes no sense developing on a laptop IMHO - unless you're talking about another kind of R&D in another field.

      On our team we remote into development servers and all development and testing is run there. Which means the computer you're actually sitting in front of just needs to be able to run a browser, rdp, ssh etc. So any machine suitable for general office work would get the job done. So no 2-3K laptops needed for development, even if that is not the primary reason. I kind of assumed everyone worked that way but haven't actually given it much thought until now.

      I haven't really seen anyone do this other than CAD work. Everywhere I've been it's local development, possibly using Eclipse Che or Coder or something for a remote IDE but still local.

      VSCode and JetBrains tools allow you to include your development environment in a container. So when you open the project it will open inside of a container with all of the dependencies included. That's the best workflow ive seen so far.

      I believe you and find it very interesting. Wov. If that's how most people work, I'm just blown away. I assumed everyone was remote and had full on development and test environments at their disposal.

      Mirrors what I've seen. What little bit I've seen it seems that development remains more often local than remote.

      ChromeOS seems to encourage away from that, but not many devs using that.

      it's like the LANLess idea, great idea, rarely implemented

      If by LANless you mean a Zero Trust Architecture, then it's more than an idea.... it's widely implemented, and proven as one of the most effective methods of security. There are large global enterprises everywhere who have already adopted and implemented it. There are many others who are currently implementing it, and there are many planning to.

      It's the only true path forward. Those who don't adopt Zero Trust Architecture, will surely end up wishing they had.

      posted in IT Discussion
      ObsolesceO
      Obsolesce
    • 1
    • 2
    • 31
    • 32
    • 33
    • 34
    • 35
    • 470
    • 471
    • 33 / 471