Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Activity for Iizukiā€­

Type On... Excerpt Status Date
Answer A: What is the point of triggering CI/CD with an empty git commit?
There's no point. It just causes unnecessary clutter and confusion. The correct way is to configure a manual way for triggering the CI/CD pipeline. In most systems there should be an API endpoint for this. Or e.g. in Gitlab you can just navigate to Project > Pipelines and click `Run pipeline`.
(more)
over 1 year ago
Comment Post #290188 Thanks for the response! Force pushing with lease is a good addition. It can be done from the cli also: `git push --force-with-lease`
(more)
over 1 year ago
Edit Post #290176 Post edited:
Tags and title
over 1 year ago
Edit Post #290177 Initial revision over 1 year ago
Answer A: How to compare a git stash to the current working tree?
Well it was easier than I thought: ```bash git diff stash ``` A note about the direction: This will show things which are present in the working directory but not present in the stash as added `+`. And vice versa with removed things. If this sounds counterintuitive, you can reverse it with th...
(more)
over 1 year ago
Edit Post #290176 Initial revision over 1 year ago
Question How to compare a git stash to the current working tree?
In git you can put your current changes aside for a moment with `git stash`. This is really neat but what often ends up happening is that you forget what was in there, and what was the state of the branch at the time of stashing. There's `git stash show`, but it only displays the differences to th...
(more)
over 1 year ago
Comment Post #290099 Yes, I wouldn't recommend writing a general purpose web server yourself, as there are good open source options to choose from. It's more of a question of how to implement the web application: As a separate process or baked into the server itself?
(more)
over 1 year ago
Edit Post #290076 Post edited:
Forgot a word..
over 1 year ago
Comment Post #290066 So you hold that there's no point in working with gateway protocols (CGI etc.), if you anyway have a reverse proxy in front (and your tooling doesn't force you to do so)?
(more)
over 1 year ago
Edit Post #290076 Post edited:
Added link
over 1 year ago
Edit Post #290076 Initial revision over 1 year ago
Answer A: How to use docker hub with podman?
Add the following to `/etc/containers/registries.conf`: ```toml unqualified-search-registries = ["docker.io"] [[registry]] location = "docker.io" ``` Now you can pull just like you would in docker: ```bash podman pull dshanley/vacuum ``` Just note that podman defines a bunch of al...
(more)
over 1 year ago
Edit Post #290075 Initial revision over 1 year ago
Question How to use docker hub with podman?
Unlike docker, Podman won't (understandably) use docker hub by default. You can use it explicitly like this: (just using a random example here, it's an OpenAPI linter) ```bash podman pull docker.io/dshanley/vacuum ``` But how to do it without the `docker.io` prefix?
(more)
over 1 year ago
Comment Post #290066 Yes, a reverse proxy is a good idea, but this doesn't really address the architectural dilemma of the service behind it. An interesting thought: A reverse proxy can be remarkably similar to the web server in path 1. You could say that it's just a difference of protocol (HTTP or e.g. CGI). But as ...
(more)
over 1 year ago
Edit Post #290060 Post edited:
Grammar
over 1 year ago
Edit Post #290060 Post edited:
Grammar
over 1 year ago
Edit Post #290060 Initial revision over 1 year ago
Question Using an existing web server vs writing your own
When writing a dynamic web service, you broadly speaking have two paths: 1. Use an existing web server (e.g. Apache, Nginx or Lighttpd) to handle the "raw" web requests and implement your own code as a separate process that communicates with the server using a gateway protocol (e.g. FastCGI). A ty...
(more)
over 1 year ago
Comment Post #290032 Good mnemonic still!
(more)
over 1 year ago
Edit Post #290032 Post edited:
Don't highlight the output of git patch, as it looked silly.
over 1 year ago
Edit Post #290032 Initial revision over 1 year ago
Answer A: Git add/stage only part of a file's changes
Git's interactive mode has a patch action. This is the shortcut for it: ```bash git add --patch ``` It will split the file into hunks and interactively ask which one's to add. It has a plethora of options but selecting `?` explains them nicely: ```txt (1/2) Stage this hunk [y,n,q,a,d,j...
(more)
over 1 year ago
Edit Post #290031 Initial revision over 1 year ago
Question Git add/stage only part of a file's changes
Say I've made a bunch of changes to a file and would like to split those changes into two or more commits. Normal `git add` however stages the whole file in one go. So how to add only some of the changes in a file?
(more)
over 1 year ago
Edit Post #289946 Post edited:
Grammar
over 1 year ago
Edit Post #289947 Post edited:
Grammar
over 1 year ago
Edit Post #289947 Initial revision over 1 year ago
Answer A: How to validate Ansible role dictionary argument's "additionalProperties"
Apparently there just isn't an equivalent of `additionalProperties` in Ansible. The way around this is to break the dictionary argument into a list of key/value pairs: ```yaml argumentspecs: main: options: dictionaryargument: description: A map from string to integers. ...
(more)
over 1 year ago
Edit Post #289946 Post edited:
Removed clutter
over 1 year ago
Edit Post #289946 Initial revision over 1 year ago
Question How to validate Ansible role dictionary argument's "additionalProperties"
In JSON Schema one can use the additionalProperties key to validate properties whose names are not know. You can still impose restrictions on their type. How to do this in an Ansible role argument spec? This doesn't work: ```yaml argumentspecs: main: options: dictionaryargument...
(more)
over 1 year ago
Edit Post #289944 Post edited:
yaml
over 1 year ago
Edit Post #289945 Post edited:
yaml
over 1 year ago
Edit Post #289945 Initial revision over 1 year ago
Answer A: How to use Ansible extract filter in map with an external dictionary
Turns out I wasn't far off. The `dictionary` mustn't be quoted. So the following works: ```yaml - name: Extraction test vars: dictionary: one: 1 two: 2 keylist: - one - two extracted: "{{ keylist | map('extract', dictionary) }}" ansible.builtin.de...
(more)
over 1 year ago
Edit Post #289944 Initial revision over 1 year ago
Question How to use Ansible extract filter in map with an external dictionary
Ansible's extract filter is supposedly made for use in map, but at the time of writing the documentation doesn't actually show how to use it together with the map filter. The following outputs VARIABLE IS NOT DEFINED!, so clearly it's missing something. I would like it to output [1, 2]. ```yaml...
(more)
over 1 year ago
Comment Post #289928 Good points. I wonder if there's any way to avoid the force pushing after using reset?
(more)
over 1 year ago
Comment Post #289928 Just a citation, added as a direct link. Feel free to adjust formatting.
(more)
over 1 year ago
Edit Post #289927 Post edited:
Added git references
over 1 year ago
Edit Post #289928 Initial revision over 1 year ago
Answer A: How to revert main branch to an earlier commit in git?
With `git reset`, but first, you may want to save the current state in another branch: ```bash $ git switch main $ git branch backup-of-main ``` Now the (perhaps messed up) state is safely stored in branch `backup-of-main`, and you can always just switch back to it and have another swing. T...
(more)
over 1 year ago
Edit Post #289927 Initial revision over 1 year ago
Question How to revert main branch to an earlier commit in git?
How to move the `main` branch back to an earlier commit in git?
(more)
over 1 year ago
Edit Post #289838 Post edited:
over 1 year ago
Edit Post #289839 Post edited:
over 1 year ago
Edit Post #289839 Initial revision over 1 year ago
Answer A: How to pass command line arguments when using cargo run?
Specify your arguments after `--`: ```bash cargo run --offline -- --my-argument 42 ``` `--offline` is just an example of cargo's own argument. They are passed before `--`. `--my-argument` and `42` will be passed to your program. Source: The Cargo Book
(more)
over 1 year ago