Commit Graph

117 Commits

Author SHA1 Message Date
Gal Szkolnik fefb5e2572 Added Get-EventLogSz (after pulling upstream) 2021-05-25 16:11:16 +00:00
Gal Szkolnik 2aa29de253 Updated HA package
Refresh-HADeviceRegistry added prompts as well as generalization using
the profile.d set variables.
Added profile.d template file for smoother setup
Added HA Addon commands
2021-05-23 16:13:28 -04:00
Gal Szkolnik b410ec839d Added Home-Assistant package. 2021-05-23 12:47:20 -04:00
Gal Szkolnik 60825c92c8 Updated MyPackage code
Better handling of package creation/modification via Set-MyPackage
Update the szCondition class to include CmdletExists+AppExeExists
2021-05-20 14:15:58 -04:00
Gal Szkolnik 23e4c03c92 Added Set-ScreenRefreshRate function 2021-05-12 09:36:07 -04:00
Gal Szkolnik 1567ed3547 Add -UseBasicParsing to bypass warning in Windowsi 2021-05-12 09:34:42 -04:00
Gal Szkolnik c38785cbf5 Edit-MyScript fix for Windows/PS5.1
When calling Edit-TextFile wihtout explicitly specifying -Path, multiple
files in command line would be passed on to editor incorrectly, with the
-Path explicitly specified, this now works in all versions of PowerShell
2021-05-12 09:29:18 -04:00
lksz 9f0d669b4c Ansible Output improvements
Using AnsibleOutput type, default type data will output 4 last lines,
while all lines would be available if needed.
2021-05-09 23:45:23 -04:00
lksz 92bd7ba69f Added haste module with New-Haste cmdlet 2021-05-08 17:48:32 -04:00
lksz 877f9adb4e Introducing Where-Ask script
A pipeline filter that will ask for confirmation based on the
parameters
2021-05-08 17:47:15 -04:00
lksz a64d3c83af Updated Ansible scripts
Cleaner output, with focus on last lines of output by default
2021-05-08 17:46:33 -04:00
lksz 7cb9f09c8c Ansible modifications
--one-line output is the default
added stopwatch timing to the default output
combined Status and RC into a single 2 element array, so that # of
columns would default to table format

Instead of -OneLine a -RawOutput switch was introduced to force full
output
2021-05-05 17:57:09 -04:00
lksz 35fe3a156f Fixed startup issues
Fixed Package condition testing which would fail, but also made it more
verbose.
Fixed shell-loading-snippets because of the rename to Setup-ScriptEnv.
2021-04-27 17:41:00 -04:00
Gal Szkolnik 5b8f0ca309 Merge branch 'master' of https://code.lksz.me/lksz/PowerShell_Scripts 2021-04-27 16:39:03 +00:00
Gal Szkolnik 171409437b Modified Setup process to be an opt-in, live type
Also minor fix to edit-textfile to accept Path named property as input

(cherry picked from commit 272d3f91af836d094d5e19a14fbfa06331677eda)
2021-04-27 16:34:19 +00:00
Gal Szkolnik 22aa3ba435 Improve performance of Package identification
Using -ListAvailable with Get-Command to ensure no module loading is
    attampeted while querying loaded commands.
    This improved performance when certain modules have not been
    loaded yet
2021-04-27 16:04:12 +00:00
lksz ac10608cc0 =Fixed oh-my-posh style verification for non Windows systems 2021-04-25 13:03:16 -04:00
lksz 499a86baa6 Added #TotalTime# option to Show-Progress Status 2021-04-22 16:51:42 +00:00
lksz 2f317c53f3 Formatting and agility
skip scoop in VSCode
Fix CovertFrom-TimeSpan to handle series and FieldName
2021-04-20 23:43:17 +00:00
lksz c9d13f5c4d package defintion improvements
Added CmdletExists and AppExeExists conditions
Cleanup of existing package description files
2021-04-16 17:07:00 +00:00
lksz 2b51f37cb7 Merge branch 'master' of https://code.lksz.me/lksz/PowerShell_Scripts 2021-04-16 15:45:54 +00:00
lksz 870887a577 Progress improvements + Waiting with progress 2021-04-16 15:45:36 +00:00
lksz b1f612828f Style update for Non-ANSI environments 2021-04-16 15:44:50 +00:00
lksz@work b303fa0f88 Cleanup of basics to work in Win + fixes to bugs 2021-04-07 16:04:46 -04:00
lksz b558edacd9 Merge branch 'master' of https://code.lksz.me/lksz/PowerShell_Scripts 2021-04-04 14:47:08 -04:00
lksz 8a93a0f123 git related improvements and implementations
+ Get-GitRepo - Clone or update a repo, with tag support
+ Get-GitHubReleaseTag - Grab tag from latest release page
+ Refresh-GitRepo - Stage all possible changes, discarding any
previously stageds changes
= GitHub repo is now git repo - as some code isn't GitHub specific
+ cat Alias for Get-Content
= Get-PossiblArguments improvement
= Invoke-WebDownload fix
= dcedit fixing bad argument processing
2021-04-04 14:42:29 -04:00
lksz 1c4bf033fb Added Pause and RandomString + some minor fixes 2021-04-02 22:58:01 +00:00
lksz 91199f7bcf =Testing for old version of PowerShellGet 2021-03-26 18:10:18 +00:00
lksz aa44d120e4 dcdown repair 2021-03-25 09:53:21 -04:00
lksz d441492cf0 Added DockerCompose completion + fixes 2021-03-23 01:06:49 -04:00
Gal Szkolnik b5b5702b17 Join-String dependency fix + Get-Path cleanup
If Join-String is missing, the 'string' module, if not existing will be
installed and then imported.
Get-Path produced an error when used with wildcard, fixed it with string
substituation.
Get-Path would output wildcard string when expansion didn't match, now
output will be blank.
2021-03-06 18:10:28 -05:00
lksz 4da3726760 Some modifications
Style default to slim theme
config updated to include bashrc
dcup, dcdown to work in parallel (supported by dco)
2021-02-22 14:58:49 -05:00
Gal Szkolnik c8869ae393 dco should handle yaml extensions on top of yml 2021-02-20 13:09:38 -05:00
lksz 22d1b7a1bc Updated Style and config for oh-my-posh v3 2021-02-19 20:03:48 -05:00
lksz 6d2a23ae04 Modify Setup, Path, added Get-MyModules
+ base/Get-MyModules added
* base/profile.d/Test-MyModules modified to use Get-MyModules
* Setup-Profile modified so that sudo witll preserve environment
* Get-Path fixed bug introduced in last commit, Get-Path would fail when
  file to be edited didn't exist
2021-02-19 19:22:46 -05:00
lksz 5dae2a2af5 Modified Get-Path with additonal switch -Expand
* Added -Expand to Get-Path
* Modified Edit-TextFile to utilize new -Expand switch
2021-02-19 15:19:42 -05:00
lksz 0e986cfaa7 Module loading upgrade
This all started because I wanted the UnixCompleters module and
initialization to move to the base.linux package.

* MyConfig.class modified to load from all modules
* Test-MyModules suppress empty entries
* removed unix entries from base/src/modules.json
+ created base.linux/src/modules.json
2021-02-18 12:27:50 -05:00
lksz 6c19a53518 Added zsys to myconfig 2021-02-18 11:00:27 -05:00
lksz f7df96c55d New commands + fixes
+ Get-Mount (mounts retuned as objects for easy filtering)
+ Get-RandomMacAddress (for easy MAC Address generation)
* Get-Path modified to resolve ~, also made it work with pipeline input
* Edit-TextFile streamlined by using modified Get-Path
* Added emacs and spacemacs to MyConfig
* dcup - attempt at cleaner output
+ added docker/profile.d/env.ps1 for default docker vars
2021-02-18 10:53:32 -05:00
lksz f947b0b3b4 Improvements and bug fixes
dcl, dcll and dcre were brokeen, fixed that
Invoke-WebDownload given a URL, automatically deduce the file file.
Get-GitHubReleaseAssets - Grab URLs from a GitHub release page.
Invoke-DockerCompose updated to display progress while waiting on
background jobs.
2021-02-10 18:26:48 -05:00
Gal Szkolnik 53226f09b4 Moved logic to szcoop repo 2021-02-07 14:02:50 -05:00
Gal Szkolnik 1672c384ad Package creation template and scoop package
Set-MyPackage has a template option that will create skelaton content
when a new package is created.
Add scoop package, so that refresh will occur automatically on
powershell launch if it hasn't been run in the past 3 hours.
2021-02-07 13:32:23 -05:00
Gal Szkolnik 4ba9a69fb9 dcup: single project-dir, no bg ('&') cmds 2021-02-03 20:03:39 -05:00
lksz e2fe1a8f06 Fixes
+ ConvertTo-Zip: Added -MuteSkipped
* sz-df sorting fixed + -PassThru added, defaulting output to
  Format-Table unless -PassThru switch is specified which will output
  the objects raw.
* Edit-DockerCompose fixed duplicate 'AdditionalFiles'
* dcup and dcreup fixed: added --remove-orphans
2021-02-03 19:59:30 -05:00
Gal Szkolnik 3d57308616 =Fixed sz-df for better output 2021-02-03 16:54:38 -05:00
lksz 449a297d8b Main ConvertTo-Zip with a few additions and fixes
+ ConvertTo-Zip, originally created to mass convert CBRs to CBZs
  It will only be avilable when 7-zip is available (7z executable)
  Features: Shows progress, can work recursively (preserving folder
  structure), knows to move completed files.
+ Show-Progress: Shorthand for common progress related output
  manipulation (calculation of completion based on time, or item count,
  and verbose output if needeed)
+ ConvertFrom-TimeSpan: string output from timespan, used by
  Show-Progress
+ Get-Path updated to be more efficient (no need for exception handling)
+ PathProcessingFunctions loads a utility function GetShellSafePath
* Repair-Permissions added some status reporting
2021-01-29 18:26:39 -05:00
lksz d1e24fa7eb dcc -OnlyTest switch now works 2021-01-23 22:07:36 -05:00
lksz 4318bfc7a8 Minor fix to Edit-DockerCompose
dcedit additional files would attempt even if not supplied
2021-01-23 21:46:48 -05:00
lksz 6549d8683d Some general shortcuts
DockerCompose, Edit AdditionalFiles shortcut #/, #tr and #lsi created
Set-MyPackage -LocalUser / -LocalHost shorthand.
2021-01-23 21:25:39 -05:00
lksz 0b644b7fdd dco commands will run sequential with single projs 2021-01-20 22:31:34 -05:00