Commit Graph

75 Commits

Author SHA1 Message Date
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
lksz 4de25b4a56 Added -OneLine which outputs a PS table 2020-11-01 01:26:20 -04:00
lksz b1980e5820 Ansible support + sz-update alias 2020-11-01 00:55:38 -04:00
lksz 310103c2f7 A lot of new stuff
Docker and Docker-Compose commands and aliases:
- dco: docker-compose
- dcc: docker-compose config
- dcedit/vidc/Edit-DockerCompose:
    edit docker-compose.yml and satellite files
- dcdown.ps1
- dl/dll/dcl/dcll:
    view docker/docker-compose logs
    l : follow
    ll : just list
- dx/dcx: docker / docker-compose exec
- dcdown: docker-compose down
- dcup: docker-compose up
- dcr: docker-compose run
- dcre: docker-compose restart
- dcreup: docker-compose up with force recreate
- di: docker inspect

A bunch of other aliases and tools:
- l/ll - shortcuts for ls -la
- Edit-MyConfig with MyConfig.class: Edit various configuration files
- Update-ArchOSz: my common update params for Arch all ready to run
- Update-UbuntuOSz: my common update params for Ubuntu all ready to run
- sz-df - a ps stylized df
- sz-du - what's the size of a dir
- sys.Linux/ls - a Linux specific ls (with all required configuration)

Works in progress (not completely tested yet):
- Stop-ProcessTree
- Update-OSz.ps1
- src/smartsudo.inc.ps1
2020-10-31 17:10:32 -04:00
lksz 306e03874d Setup-Profile will update git scripts from git repo 2020-10-03 16:32:55 -04:00
Gal Szkolnik f4abdf1a2d Fixed minor cross-platfrom bug in Reload-MyScripts 2020-10-03 16:23:08 -04:00
lksz 968b6c2bbb Adding common commands + Minor modifications
Reload-MyScripts modified to check for past aliases that might block it
from working.
Aliases dir created with some basic aliases
Invoke-Sudo to make sudo command line calling simpler.
2020-10-03 16:17:11 -04:00
lksz 38aa7720de Added default env.ps1 2020-10-02 16:19:08 -04:00