This howto walks through setting up a customized PowerShell environment on
Windows — configuring Git with sensible aliases, and installing Starship for
a useful prompt. The target is PowerShell 7 (pwsh), used both standalone
(Windows Terminal) and as the integrated terminal in VS Code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| name=${ARTIFACTORY_USER:-$(whoami)} | |
| OUTFILE="${name}.docker.sysinfo" | |
| info() { printf "$*\n" >> "$OUTFILE"; } | |
| err() { printf "$*\n" >&2; exit 1; } | |
| [[ "tws-stack-deployment" != "$(basename "$(pwd)")" ]] && err "Run from tws-stack-deployment dir" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "type": "object", | |
| "required": ["name", "version", "repositories"], | |
| "properties": { | |
| "name": { "type": "string" }, | |
| "version": { "type": "string" }, | |
| "repositories": { | |
| "type": "array", | |
| "items": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "id": "https://docs.atlassian.com/jira/REST/schema/page-response-of-space#", | |
| "title": "Page Response of Space", | |
| "type": "array", | |
| "items": { | |
| "$ref": "#/definitions/space" | |
| }, | |
| "definitions": { | |
| "anonymous": { | |
| "title": "Anonymous", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git config --global alias.ci 'commit -v' | |
| git reset --hard <commit> # careful, but roll the current branch back to earlier commit | |
| git rev-list -n 1 <tagname> # show the commit associated with a tag | |
| git tag -f 2.3.0 # Apply a tag | |
| git push origin --all # push all branches (not just current) | |
| git push origin --tags # push all tags | |
| git diff --name-only SHA1 SHA2. # show just changed files between commits | |
| git diff --name-only master # show just changed files from current branch to master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/yaml/constructor.py b/lib/yaml/constructor.py | |
| index 516dad1..598963c 100644 | |
| --- a/lib/yaml/constructor.py | |
| +++ b/lib/yaml/constructor.py | |
| @@ -136,6 +136,9 @@ class BaseConstructor(object): | |
| except TypeError, exc: | |
| raise ConstructorError("while constructing a mapping", node.start_mark, | |
| "found unacceptable key (%s)" % exc, key_node.start_mark) | |
| + if key in mapping: | |
| + raise ConstructorError("while constructing a mapping", node.start_mark, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"lastUpload":"2019-11-25T19:05:40.050Z","extensionVersion":"v3.2.9"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List all exited containers | |
| docker ps -aq -f status=exited | |
| Remove stopped containers | |
| docker rm $(docker ps -aq --no-trunc) | |
| This command will not remove running containers, only an error message will be printed out for each of them. | |
| Remove dangling/untagged images | |
| docker rmi $(docker images -q --filter dangling=true) |