Commit Graph

82 Commits

Author SHA1 Message Date
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
lksz 9dca986b74 Profile update/fixes
Fixed Get-PowerShellPath - was failing when a zombie process was alive
Fixed Remove-Item failing when setting up profile.
2021-01-19 10:17:23 -05:00
lksz b9c429ece4 Fixed Edit-DockerCompose to treat multiple files 2021-01-18 19:04:39 -05:00
lksz 1b62fd1114 Updated Pull-ViaAnsible to allow Path
it's also a OneLiner output by default
2021-01-15 02:24:53 -05:00
Gal a7ac392886 Fixes and completion of Invoke-DockerCompose 2021-01-15 01:56:10 -05:00
lksz dcc9113cda DockerCompose commands refactoring
All dc... commands are now based on Invoke-DockerCompose.
dco is aliased to Invoke-DockerCompose.
dco_ is aliased to the docker-compose binary.
'&' and '!' shorthand introduced to dco to execut in bg as job and wait
for all bg jobs to complete respectively.
2021-01-15 01:15:54 -05:00
lksz c453e5bdea Fixing the shell-loading-snippets and the editor 2021-01-14 21:31:31 -05:00
lksz 3f9303bad2 moved Setup-Profile back to root
This will preserve the https://lksz.me/pwsz link from breaking.
2021-01-14 19:23:51 -05:00
Gal Szkolnik c552452ac4 Added support to Dockerfile and env in dcedit 2021-01-14 17:24:29 -05:00
lksz b8c343d908 myconfig updated
better handling of vimrc
fix: shrc duplicate conflicting entries
2021-01-14 11:50:36 -05:00
lksz 24b5e928d0 docker and docker-compose commands
Invoke-DockerCompose which will be the basis of all other future dc
prefixed commands (which currently contains to much copy-pasted code)
2021-01-13 01:02:37 -05:00
Gal Szkolnik 6e56ac6097 updated .gitignore 2021-01-12 23:06:32 -05:00
lksz abd9cc4abc Added Repair-Permissions 2020-12-07 04:41:46 -05:00
lksz 3844492976 Merge branch 'master' of https://code.lksz.me/lksz/PowerShell_Scripts 2020-12-05 18:19:37 -05:00
lksz@work 4cec655429 Fixes to packagesz class code and the win package 2020-12-06 01:18:12 +02:00
lksz 18c2adcf8f Merge branch 'master' of https://code.lksz.me/lksz/PowerShell_Scripts 2020-12-02 00:31:47 -05:00
lksz aca79c186a Created a dedicated ansible package 2020-12-02 00:30:57 -05:00
lksz (@amnon) 8b2a4ca0cb Tweaks and fixes
Improved sz-df output of zfs mounts
Removed PowerShellCookbook dependecy in Packagesz class
2020-12-02 00:00:57 -05:00
Gal Szkolnik c6cc116564 Streamlined pwsz loading from Linux shells
Get-Path updated to support @ notation.
MyConfig class updated to resolve Paths before testing.
MyScript class will look recursivley - this might need to change again.
config.files.json updated to support shell-loading-snippets
shell-loading-snippets added, with single line of code to inject into
startup shell scripts (.zshrc, .bashrc, .shrc)
2020-12-01 23:31:42 -05:00
Gal Szkolnik e34d9d4e4d Merge branch 'master' of https://code.lksz.me/lksz/PowerShell_Scripts 2020-11-25 01:22:35 -05:00
lksz 1792bb23a1 Introducing Packages
Major Overhaul with Breaking Changes
split into packaged, default behavior moved into 'base' package
each package has a json package description file with criteria for
loading

Modified Setup-Profile to refer to 'base' package path for auto loading

moved Linux aliases and command to 'base.linux' package
created 'docker' package to address docker supported systems

modified Get-MyScripts, Edit-MyScripts and Reload-MyScripts accordingly.

Dropped -System and sys.*, package json conditions will take care of it.

Supplied command to create/edit package json files:
  - New-MyPackage
  - Add-PackageCondition
  - Set-MyPackage
2020-11-25 01:20:52 -05:00
lksz 42b39f4e25 Introducing Packages
Major Overhaul with Breaking Changes
split into packaged, default behavior moved into 'base' package
each package has a json package description file with criteria for
loading

Modified Setup-Profile to refer to 'base' package path for auto loading

moved Linux aliases and command to 'base.linux' package
created 'docker' package to address docker supported systems

modified Get-MyScripts, Edit-MyScripts and Reload-MyScripts accordingly.

Dropped -System and sys.*, package json conditions will take care of it.

Supplied command to create/edit package json files:
  - New-MyPackage
  - Add-PackageCondition
  - Set-MyPackage
2020-11-25 00:46:33 -05:00
lksz@work 80a488484b Set-EnvVariable + minor fix to SystemName 2020-11-24 13:15:47 -05:00
Gal Szkolnik 25ec753675 Renamed dl into dlogs.
scoop relies on an internal command of it's named dl, and having a dl
command breaks it. Renaming the dl command resolved the issue.
2020-11-16 08:51:21 -05:00
lksz 1bef8ca119 Improved Export-FunctionSource + some Docker fixes
Export-FunctionSource to handle Filters and scripts + following Aliases.
Edit-DockerCompose will allow editing of additional files next to the
default docker-compose files.
dcc, dcdown and dcup to work with ProjectPath parameter.
Added ssh.conf to the config.files.json dictionary.
2020-11-11 16:38:56 -05:00
Gal Szkolnik 38dab59d62 Make sure Z is loaded if it exists 2020-11-09 13:16:09 -05:00
Gal Szkolnik 8566ea6863 Better cross platform support
Edit-MyScript will pause if edit is running in background (conext
returning less than a second after launching editor)
Test-MyModules which loads at stratup now has specific platform lists
2020-11-09 13:06:17 -05:00
Gal 7dd40b7b82 Test-MyModules finalized, ready for work
Future imporvement will allow prompting for installation or a command to
automate following recommendations.
2020-11-05 00:29:04 -05:00
lksz 0d5522b8c7 test-modules startup script draft 2020-11-05 00:08:59 -05:00
Gal Szkolnik baa3ccd04d Updated MyConfig code to include modules
This is a prep for MyModules, a way to notify users that a module
installation is recommended for the features of the scripting
environment
2020-11-05 00:00:18 -05:00
lksz f00e9090a5 Added ssh configuration to MyConfig
Added files to config.files.json file
2020-11-04 23:42:17 -05:00
lksz 524bce25de MyConfig modifications
Moved configuration into src/config.files.json, it will also load
src/config.files.local.json (which will not be included in the git repo)

Added Git-Path to resolve paths simply, even when Path does not exist.
2020-11-04 23:31:34 -05:00
Gal Szkolnik d85aec0480 Fixed a bug in FromPowerShellCookbook 2020-11-04 11:45:53 -05:00
lksz ac9c5ed352 Various additions
dps is now an Alias to Get-DockerProcess
Get-DockerProcess has been cleaned up and search features added to it.

Added FromPowerShellCookbook, which loads a piece of code from the
module, but does not load the entire module.
MyConfig now includes ansible and tmux configs, also added -sudo switch
Get-PlexInfo added, with ability to read directly from Server
Invoke-ViaAnsible modified - cleaned up output
Added -Force to Edit-DockerCompose
dcc modified to read from raw log (which allows filtering by source, and
has timestamps)
2020-11-04 10:58:04 -05:00
lksz 59a2949268 Moved Ansible invocation to sys.Linux 2020-11-01 01:19:26 -05:00
lksz 2302343a15 Get-PlexInfo and txm
sz-rsync, not expected to work yet.
2020-11-01 01:15:34 -05:00