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
Comment Post #290300 @#53526 What would you suggest instead?
(more)
5 days ago
Edit Post #290301 Initial revision 6 days ago
Answer A: What is the default port number of MariaDB?
The default port is 3306. MariaDB is a fork of MySQL, and this is the default port for MySQL as well. Source.
(more)
6 days ago
Edit Post #290300 Initial revision 6 days ago
Question What is the default port number of MariaDB?
What is the default port number of MariaDB database server? (Remembering defaults is surprisingly hard since usually you don't need to specify them..)
(more)
6 days ago
Edit Post #290240 Initial revision 17 days ago
Answer A: How to run Gitlab CI jobs only in specific branches?
Compare `$CICOMMITBRANCH` to your desired branch name in `rules`: ```yaml .gitlab-ci.yml stages: - test - deploy This job will run always. test-job: stage: test image: bash script: - echo Test successful! deploy-job: stage: deploy rules: # Run only in main...
(more)
17 days ago
Edit Post #290239 Initial revision 17 days ago
Question How to run Gitlab CI jobs only in specific branches?
By default Gitlab CI jobs run on any commit. I would like to restrict some of them to run only on commits to specific branches. How to do this in `.gitlab-ci.yml`?
(more)
17 days ago
Edit Post #290189 Initial revision 24 days ago
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)
24 days 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)
24 days ago
Edit Post #290176 Post edited:
Tags and title
26 days ago
Edit Post #290177 Initial revision 26 days 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)
26 days ago
Edit Post #290176 Initial revision 26 days 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)
26 days 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)
about 1 month ago
Edit Post #290076 Post edited:
Forgot a word..
about 1 month 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)
about 1 month ago
Edit Post #290076 Post edited:
Added link
about 1 month ago
Edit Post #290076 Initial revision about 1 month 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)
about 1 month ago
Edit Post #290075 Initial revision about 1 month 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)
about 1 month 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)
about 1 month ago
Edit Post #290060 Post edited:
Grammar
about 1 month ago
Edit Post #290060 Post edited:
Grammar
about 1 month ago
Edit Post #290060 Initial revision about 1 month 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)
about 1 month ago
Comment Post #290032 Good mnemonic still!
(more)
about 2 months ago
Edit Post #290032 Post edited:
Don't highlight the output of git patch, as it looked silly.
about 2 months ago
Edit Post #290032 Initial revision about 2 months 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)
about 2 months ago
Edit Post #290031 Initial revision about 2 months 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)
about 2 months ago
Edit Post #289946 Post edited:
Grammar
about 2 months ago
Edit Post #289947 Post edited:
Grammar
about 2 months ago
Edit Post #289947 Initial revision about 2 months 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)
about 2 months ago
Edit Post #289946 Post edited:
Removed clutter
about 2 months ago
Edit Post #289946 Initial revision about 2 months 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)
about 2 months ago
Edit Post #289944 Post edited:
yaml
about 2 months ago
Edit Post #289945 Post edited:
yaml
about 2 months ago
Edit Post #289945 Initial revision about 2 months 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)
about 2 months ago
Edit Post #289944 Initial revision about 2 months 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)
about 2 months ago
Comment Post #289928 Good points. I wonder if there's any way to avoid the force pushing after using reset?
(more)
about 2 months ago
Comment Post #289928 Just a citation, added as a direct link. Feel free to adjust formatting.
(more)
about 2 months ago
Edit Post #289927 Post edited:
Added git references
about 2 months ago
Edit Post #289928 Initial revision about 2 months 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)
about 2 months ago
Edit Post #289927 Initial revision about 2 months 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)
about 2 months ago
Edit Post #289838 Post edited:
2 months ago
Edit Post #289839 Post edited:
2 months ago
Edit Post #289839 Initial revision 2 months 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)
2 months ago
Edit Post #289838 Initial revision 2 months ago
Question How to pass command line arguments when using cargo run?
When developing a rust program you build and run using `cargo run`. However you cannot just append arguments to that as they will be caught (and likely rejected) by cargo itself. So how to pass arguments through cargo run to the actual program under development?
(more)
2 months ago
Edit Post #289829 Post edited:
2 months ago
Comment Post #289829 Yes that's it. Probably one can delete any branch like this, but that's beyond this question.
(more)
2 months ago
Edit Post #289829 Post edited:
2 months ago
Edit Post #289830 Initial revision 2 months ago
Answer A: How to delete a local branch in git?
The safe way: [[1]](https://git-scm.com/docs/git-branch#Documentation/git-branch.txt---delete) ```bash git branch --delete ``` It will fail if the branch isn't merged. If this is ok then you can delete it anyway like this: [[2]](https://git-scm.com/docs/git-branch#Documentation/git-branch.txt---...
(more)
2 months ago
Edit Post #289829 Initial revision 2 months ago
Question How to delete a local branch in git?
How to delete a local git branch which hasn't been pushed to anywhere, and only exists locally?
(more)
2 months ago
Edit Post #289571 Post edited:
3 months ago
Edit Post #289572 Initial revision 3 months ago
Answer A: Tidy Ansible assert module loop output
Use the `quiet` parameter: ```ansible - name: Assertions ansible.builtin.assert: that: - item quiet: true loop: "{{ loopitems }}" vars: loopitems: - true - true - false ``` This will produce the familiar one line outputs.
(more)
3 months ago
Edit Post #289571 Initial revision 3 months ago
Question Tidy Ansible assert module loop output
Looping in Ansible usually produces a neat output of one line per iteration (per host): ```ansible ... ok: [Arch] => (item=something) ok: [Arch] => (item=somethingelse) ok: [Arch] => (item=yetanotherthing) ok: [Arch] => (item=thisbetterbethelastone) ok: [Arch] => (item=ohhnoitwasnt) ok: [Arch...
(more)
3 months ago
Comment Post #289491 How does git actually handle incomplete (local) repositories? Given that commits are changesets, just cloning a few of the most recent changes wouldn't result in anything sensible. So does it like create an archive of the history beyond the desired depth, and apply the most recent commits on that?
(more)
3 months ago