I have a random folders names structure directories as below: Each file.txt has one value e.g. -300. I am trying to loop through those folders with the random naming and collect the data in one text file in the Main directory maintaining the original directory name as below: The result.txt should contain as b…
Linker –whole-archive option
I am using C language. I am linking static libraries with –whole-archive. Linker is arm-none-eabi-ld For example, giving the following option to the linker: But still I get linking error: Why is the linking error happening? EDIT: Full command with output: Out put of: readelf -Ws kunit.a hal.a fs.a | egr…
Laravel images not shown in any browser while firefox throwing “Image x cannot be displayed because it contains errors” error
My laravel app’s images are not being shown in Firefox Chrome or Edge Firefox shows a more explicit error saying “The image [image] cannot be displayed because it contains errors” ie: the following image is not being shown: http://test-gestion.pedifacil.com/storage/app/public/1/logo_196_196.…
bash check if the outputs (.txts) in multiple directories contained certain string
I generated multiple script.txt in multiple directories for different subjects. Now I need to check if all the script.txts contain string ” finished without error”. If yes, returned ok; if no, returned parents directory, so that I knew which subject went wrong. It was fine when I checked in subdir…
Validation URL information with nginx
We have API application, which uses many customers. Every customer have API token, which he passed in GET request. Example from access log: We want to create whitelist for tokens and limit the number of connections per second for each of the tokens using nginx. Can you advise something on the implementation o…
Docker multi serivces in a single container
is it a good practice to create one dockerfile with all needed container , ex : Answer This is actually a bad idea. The principle of containers is one service per one container. A container is really just a process. You might run 50 different containers on a machine, with very little overhead, and still gain …
Find a directory in shared library search path : Another solution?
Nine years ago, this question has been asked : Find a directory in shared library search path (Find a directory in shared library search path). An answer has been given using : opendir() then readdir() then dlopen() … Nowadays, is there a simpler way to do it or should I still follow this SMOP ? Answer …
The best way to authorize ssh key of each node to all nodes in the cluster
I want to create a cluster infrastructure that each node communicates with others over shh. I want to use ansible to create a idempotent playbook/role that can be executed when cluster initialized or new nodes added to cluster. I was able to think of 2 scenarios to achieve this. First Scenario task 1 fetches…
Docker login x509: certificate signed by unknown authority
I am running docker registry as container in Redhat Linux 7.5 with Docker 18.09.3-3 version. if configured with self-sign certificate. container started successfully. it works with curl with-out any error. but giving error for docker login command. curl command works login command how to resolve this error me…
Bash export variables but only for current command
I want to load some environment variables from a file before running a node script, so that the script has access to them. However, I don’t want the environment variables to be set in my shell after the script is done executing. I can load the environment variables like this: However, after the command …