Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rcfiles
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nimrod
rcfiles
Commits
1b8c9bca
Commit
1b8c9bca
authored
7 years ago
by
nimrod
Browse files
Options
Downloads
Patches
Plain Diff
- Use the json.tool module instead of writing my own one-liner.
parent
1ffc4ddb
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.bashrc
+1
-0
1 addition, 0 deletions
.bashrc
Documents/bin/json-prettify
+0
-8
0 additions, 8 deletions
Documents/bin/json-prettify
with
1 addition
and
8 deletions
.bashrc
+
1
−
0
View file @
1b8c9bca
...
@@ -76,6 +76,7 @@ alias sudo="sudo "
...
@@ -76,6 +76,7 @@ alias sudo="sudo "
alias
presentation
=
'docker run -itv "$PWD:/project" adarnimrod/presentation'
alias
presentation
=
'docker run -itv "$PWD:/project" adarnimrod/presentation'
alias
prune_prerun
=
'find "$HOME" -maxdepth 1 -name ".prerun.*" -print0 | grep -zv "$(pgrep -u "$(id -u)" bash)" | xargs -0r rm '
alias
prune_prerun
=
'find "$HOME" -maxdepth 1 -name ".prerun.*" -print0 | grep -zv "$(pgrep -u "$(id -u)" bash)" | xargs -0r rm '
alias
netdata
=
'docker run --detach --name netdata --cap-add SYS_PTRACE --volume /proc:/host/proc:ro --volume /sys:/host/sys:ro --volume /var/run/docker.sock:/var/run/docker.sock --publish 19999:19999 firehol/netdata'
alias
netdata
=
'docker run --detach --name netdata --cap-add SYS_PTRACE --volume /proc:/host/proc:ro --volume /sys:/host/sys:ro --volume /var/run/docker.sock:/var/run/docker.sock --publish 19999:19999 firehol/netdata'
alias
json-tool
=
'python3 -m json.tool'
deduce_aws_region
()
{
deduce_aws_region
()
{
AWS_DEFAULT_REGION
=
"
$(
python
<<
EOF
AWS_DEFAULT_REGION
=
"
$(
python
<<
EOF
...
...
This diff is collapsed.
Click to expand it.
Documents/bin/json-prettify
deleted
100755 → 0
+
0
−
8
View file @
1ffc4ddb
#!/usr/bin/env python3
'''
Get JSON from stdin, output pretty JSON to stdout.
'''
import
json
import
sys
if
__name__
==
'
__main__
'
:
print
(
json
.
dumps
(
json
.
load
(
sys
.
stdin
),
indent
=
4
,
sort_keys
=
True
))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment