Json – Using Bash to edit VS Code Settings
I am trying to use the npm package.json to edit the VS Code settings from a bash script. I found How to change VS Code settings from terminal (bash) which has helped me to almost achieve what I wanted. I…
I am trying to use the npm package.json to edit the VS Code settings from a bash script. I found How to change VS Code settings from terminal (bash) which has helped me to almost achieve what I wanted. I…
Basically I want to assign a dynamically calculated default value for ARG in my Dockerfile: FROM node:20-alpine ARG RELEASE_TAG=$(git describe --tags --always) # Other commands... So, far it doesn't interpolate the value of $(git describe --tags --always) and simply assigns…
For my job, we create a lot of small web applications with NodeJS for the backend and Angular for the frontend Said apps usually involve a lot of CRUDs With Angular, I can run: ng generate component 'component-name' Which generates…
I have a scripts repo, which have few scripts among which I have a build.sh file that I want to run when GitLab CI runs. Can I simply add that to my GitLab CI file under scripts section? Which I…
I have a bash script: #! usr/bin/env bash # test bash script to call python scripts cd ~/python for ((i = 1; i <= 2; i++)); do python3 test_0$i.py; done cd ~/bash that pulls test_0x.py files from the python directory…
I have a bit of a weird situation where I need to source the output of a script to set up some environment variables (which are only known at build time) before several RUN steps in my Dockerfile. I know…
I am performing an SQL query in bash like this: updated_records="select class, subject, teacher from main_a where date(updated_at) = '2024-03-07';" after running the query I am getting the results like this class | subject | teacher -----------+-----------+--------- A123 | maths…
I want to stop all containers that have dev1102in their name. There are several containers but I never know how many. So I run docker ps |grep -o 'dev1102_[A-Za-z_]*' which lists me all containers I need. Output looks like this…
I have a shell function to help me scp files to and from servers. Both servers are running bash on Ubuntu 22.04. Let's call the server comp2 and pretend its IP address for is 192.168.1.2 On my server in the…
my userapi if __name__ == "__main__": if len(sys.argv) >= 2: try: app_port = int(sys.argv[1]) except ValueError as ve: app_port = 5558 app.run(debug=True, host='0.0.0.0', port=app_port) else: raise ValueError('No starting port for the application') my startdocker.sh file #!/bin/bash docker container stop userapi_cnt_ad…