git ls-files | Measure-Object -line
There must be a very good reason why we complicated our lives with all these technologies ... arguably that is freedom for something. Freedom might be a right but it is never free; so let me demonstrate how I earned it.
Showing posts with label PowerShell. Show all posts
Showing posts with label PowerShell. Show all posts
Monday, June 27, 2022
Counting tracked files in a Git repo, in PowerShell
Friday, May 8, 2020
Testing REST API using Invoke-RestMethod in PowerShell
cURL seems to be the standard for casual testing of Web Services endpoints. I've been stuck with a Windows laptop lately for a client Salesforce project, and cURL (and Salesforce Workbench for that matter) can be flaky to deal with, esp in a security environment that's tightly controlled by Group Policy. Then I discovered Invoke-RestMethod. It's a nify little cmdlet available since PowerShell 3.0.
My first task was to download an event log file, and as a complete newbie, I was done in 5 minutes with my 250 MB file in hand, no installation required! Here's how it looked like

The cmdlet has a ton of options, so I'm sure I'll be back to it a lot as long as I keep working on Windows with Salesforce REST APIs...
My first task was to download an event log file, and as a complete newbie, I was done in 5 minutes with my 250 MB file in hand, no installation required! Here's how it looked like
The cmdlet has a ton of options, so I'm sure I'll be back to it a lot as long as I keep working on Windows with Salesforce REST APIs...
Subscribe to:
Posts (Atom)