Commit Graph

147 Commits

Author SHA1 Message Date
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
Gal Szkolnik a782d09b2c fixed scoping issue 2020-10-01 18:19:23 -04:00
lksz 0718bf28c7 Minor midifications 2020-10-01 00:28:57 -04:00
lksz 45b53dc110 Minor auto-complete cosmetics 2020-09-30 17:43:36 -04:00
Gal Szkolnik dc9f29f471 Setup-Profile fixes + Edit-TextFile fixes
Setup-Profile: GitClone verbosity
Fixed: Existing $profile code will not be overwritten,
   instead profile code will be inserted before existing code.
Fixed: status message is reflected correctly:
  * Setup (replace/append)
  * Init (file created)
  * Clenaup (removal of code / deletion)
When profile code is removed, a placeholder remains behind,
  this will allow correct replacement if another setup is performed

Edit-TextFile:
Switched to Invoke-ExpressionEx for sudo invocation.
2020-09-30 16:43:07 -04:00
lksz 7117e78a7a GitClone fix
GitClone will work even when Scripts dir already exist
2020-09-30 11:30:28 -04:00
lksz 607fff132f Mending Broken Windows #2
Editor, no Remove-Alias before PowrShell Core.
IValidateSetValuesGenerator missing before PowerShell Core
2020-09-30 00:14:51 -04:00
Gal Szkolnik 586f187346 Fixing Windows Setup 2020-09-29 19:51:48 -04:00
lksz a4bdd9c9a5 Added Edit-TextFile 2020-09-29 16:50:19 -04:00
lksz ae07e06c27 Setup-Profile and co.
Setup-Profile included, read all about it at
https://blog.lksz.me/the-profile-and-setting-it-up
When running Edit-MyScript without parameters, the $MyPSScriptRoot path
will be sent (editing the directory)
Added ability to edit scripts with Edit-MyPrfiles, making editing
profiles alongside scripts easy.
2020-09-25 01:30:21 -04:00
lksz 06052cfa29 Reload-MyAliases is now Reload-MyScripts
🔖 https://blog.lksz.me/editing-with-ease/

✏️ Fixed $MyPSScriptRoot typo
 Get-ScopeDepth
🐛 Get-MyAliases didn't work correctly when sub-scoped, fixed the issue
🚚 Reload-MyAliases is now Reload-MyScripts
🐛 Reload-MyScripts loads scripts from $MyPSScriptRoot/profile.d subdir
📝 README updated to reflect change of script name and typo
2020-09-18 15:56:40 -04:00
lksz bb2488e591 Added a call to Reload-MyAliases 2020-09-16 15:24:19 -04:00
Lockszmith bfb2e38cc0 MyAliases management
 Get-MyAliases, Reload-MyAliases
📝🕸 https:/blog.lksz.me/a-case-of-sensitivity/
2020-09-16 14:40:30 -04:00
lksz e054a0c518 Initial commit 2020-09-16 10:56:03 -04:00