Commit Graph

63 Commits

Author SHA1 Message Date
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
lksz e86c7350be Create $PROFILE's parent dir if it doesn't exists 2020-10-02 15:54:23 -04:00
lksz 90e1723052 Change Move-Item to Copy-Item 2020-10-02 15:49:24 -04:00
lksz ccaaadf371 Setup fixed setup of MyPSScriptRoot (again) 2020-10-02 15:42:40 -04:00
lksz fe97c2880a Fixed cross linked device failing move of .git dir 2020-10-02 14:23:54 -04:00
lksz e14f00d98d Streamline setting of /home/szmedia/.local/share/powershell/Scripts during _setup 2020-10-02 14:16:23 -04:00
lksz a4c4334550 Merge branch 'master' of https://code.lksz.me/lksz/PowerShell_Scripts into master 2020-10-02 14:13:38 -04:00
lksz c25de685c1 Replaced -GitClone with -NoGitClone 2020-10-02 14:13:33 -04:00
lksz 5a119da010 Better instructions 2020-10-02 14:11:46 -04:00
lksz ef920fbb7d Fixed /home/szmedia/.local/share/powershell/Scripts assignment 2020-10-02 14:01:29 -04:00
lksz bb23d940ea Merge branch 'master' of https://code.lksz.me/lksz/PowerShell_Scripts into master 2020-10-02 13:24:35 -04:00
lksz eec4eb2cbe Updating README.md with current instructinos 2020-10-02 13:04:17 -04:00
lksz 2d2a7bba5d System specific update
Reload-Scripts now loads Platform/OS specific scripts depending on
current state.
This required the SystemName class

sranger is an example of running ranger as sudo, but only in Linux.

Moved Get-MyAliases into Reload-MyScripts, and changed Reload-MyScripts
to load Aliases dynamically via the Aliases directory.
2020-10-02 12:45:04 -04:00