Skip to content

Instantly share code, notes, and snippets.

View marvingreenberg's full-sized avatar

Marvin Greenberg marvingreenberg

View GitHub Profile
@marvingreenberg
marvingreenberg / Docker cleanup
Created September 11, 2017 13:45
Docker Cleanup
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)
@marvingreenberg
marvingreenberg / cloudSettings
Last active December 9, 2019 16:47
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-11-25T19:05:40.050Z","extensionVersion":"v3.2.9"}
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,
@marvingreenberg
marvingreenberg / curl.md
Created January 5, 2020 21:38 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

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
{
"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",