How to generate random numbers under OpenWRT?

With a "normal" (i mean "full") linux distro, it works just fine: sleep $(echo "$[ ($RANDOM % 9 ) ]") ok, it waits for about 0-9 sec but under OpenWRT [not using bash, rather "ash"]: $ sleep...

Burst memory usage in Java

I am trying to get a handle on proper memory usage and garbage collection in Java. I'm not a novice programmer by any means, but it always seems to me that once Java touches some memory, it will...

clang: how to list supported target architectures?

Currently I am interested in ARM in general and specifically iphone/android targets. But I just want to know more about clang, since it feels to play important role in the years to come. I...

Bash - Hardware Info (Spanish text in the script)

#!/bin/bash function Procesador() { # Determinando la Velocidad del Procesador CPUMHz=`cat /var/log/dmesg | grep "MHz processor" | cut -d " " -f07 | sed 's/[.].*//'` if [ "$CPUMHz" -ge "133"...

Unable to set proper resolution/not detecting display properly

This is probably the farthest removed Q&A place to ask about this, but I've tried every other reasonable and/or obvious source I can think of with no luck. I have both a BeagleBone Black and a...

Error using YUM and DNF in Fedora 21

I read this article in fedoramagzine.org and followed the process. Since then I am unable to perform updates, installation etc from both yum and dnf. This is the error I get from...

Getting icon based on mimetype of a file, Linux + Python

Core Question: How to turn mimetype - image/png in to actual path to an icon file - /usr/share/icons/Menda-Circle/mimetypes/24x24/application-image-png.svg while respecting linux distros DE's icon...

How to see if git binary is using openssl or gnutls?

I'm trying to debug a strange issue with git clone, https protocol, of one specific repo using Ubuntu with a corporate proxy. The same thing works in CentOS, Fedora distros but not on Ubuntu or...

Failed to execute goal org.apache.maven.plugins: maven-assembly-plugin (GroupId cannot be empty)

I am very much new to maven and Oozie, when i am using the command, ./mkdistro.sh -DskipTests -Dmaven.javadoc.skip=true to build oozie from Oozie-3.3.2 bin folder, i am getting some error...

OS Container vs Application Container

So, the other day I was reading about OS/System Container vs Application Container here. There it is mentioned that Docker is an application container and Any container that runs an OS is a...

Combine multiple csv files into a single xls workbook Python 3

We are in the transition at work from python 2.7 to python 3.5. It's a company wide change and most of our current scripts were written in 2.7 and no additional libraries. I've taken advantage of...

tensorflow on GPU: no known devices, despite cuda's deviceQuery returning a "PASS" result

Note : this question was initially asked on github, but it was asked to be here instead I'm having trouble running tensorflow on gpu, and it does not seems to be the usual cuda's configuration...

Error while loading shared libraries: /usr/local/lib64/libssl.so.1.1

I’m trying to compile openssl-1.1.0e on Centos 7 (7.3.1611) but after i successfully compiled everything without any warning, i get an error when i’m trying any openssl command [[email protected]

How do I set up a Bitcoin or Altcoin DNS seed with BIND9?

I’m currently working on an altcoin clone project and trying to setup the initial DNS seed nodes that are hard coded into the coin’s source. I’ve seen there are basically two common...

How to fix 'Could not load the Qt platform plugin "xcb" in "" even though it was found.' after fixup_bundle macro?

I'm trying to setting up a standalone binary archive (.tar.gz) that can run on most Linux distros (ex. Blender). I'm still not familiar with CMake. As far as I know, all the dependencies can be...

Pyenv cannot switch Python versions

I have pyenv installed, however, it does not do its most basic function, namely switch Python versions. The following terminal commands demonstrate this. the file `main.py` is equivalent...

Yocto: question on adding bluez-alsa in Yocto build

I am new to Yocto, I built core-image-sato for default machine (x86-qemu). I have below questions with adding recipe: I want to add bluez-alsa in the build. I checked...

Deploying Flask app on NginX / Passenger server on Ubuntu 16.04 LTS in production mode on VPS

Question 1: What is the problem?: Following this tutorial I installed Nginx and Passenger on Ubuntu 16.04 to run Python Flask app and I run into this issue: When I visit my server at...

Docker in WSL2: Cannot connect to the Docker daemon at tcp://localhost:2375. Is the docker daemon running?

I am currently running a Debian Distro (The default one from the Microsoft Store) on WSL 2 and I am having a lot of trouble with running Docker on it. My OS currently is Windows 10 Education...

best solution to sync 2 mysql databases in a laravel project

I have a laravel project that is supposed to run in a localhost. but we needed to add the ability to do some modification while user of the app is away from his pc that the app runs on it's...

Why Docker can't detect WSL 2 distro in Windows 10 Home?

I've followed the instruction in the official website to use docker with WSL 2 and I've installed the Ubuntu 18.04 for WSL 2 distro. I thought docker can automatically detect my distro, so I can...

Mounting cifs share using kerberos fails with 'Operation not supported'

I'm trying to mount a network share using cifs and kerberos on a CentOS 8 distro. I am able to mount the share correctly using my explicit credentials, but passing the option of sec=krb5 doesn't...

How to get rid of enclosing paragraph texts with BeautifulSoup in Python?

I am new to python and I'm building a web crawler to go through a list of articles on the internet and grab the text from them. When I use the function get_text(url), however, I am getting a lot...

How to set up custom hostnames and ports for servers (eg node.js) running in WSL 2

(I've provided a simple working solution in response) I recently moved from macOS to WSL 2. I have two node servers running within WSL 2 (Ubuntu distro). Each must be accessible through a custom...

meta-qt5 yocto layer not compile on qt release 5.15.2

I cannot build my yocto distro (from 'pyro' version) when upgrade the meta-qt5 to the Qt version 5.15.2: I checkout the repository of meta-qt5 to the master branch that now support the qt 5.15.2,...

Docker (compose): connection refused without sudo

All was fine until "something". After that "something", I could use docker and docker-compose with sudo but without it the docker would hang indefinitely and the docker-compose would return...

Django ImportError: Module "social_core.backends.google" does not define a "GoogleOpenId" attribute/class

I've cloned my working Django app into a Debian based Linux distribution, I've installed all dependencies, but when trying to login with email and password or with Google account it throws me the...

Php 8.0 update does not parse from httpd

I updated php on my test platforms from php 7.4 to php 8.0. The update on the Centos 8 box works normally. The one on Centos 7 does not. The page with <?php phpinfo() ?> comes up blank while my...

Why /user/local/go isn't recognized as a Go SDK in GoLand

I'm trying to setup GoLand to use WSL 2 as in this guide: https://www.jetbrains.com/help/go/how-to-use-wsl-development-environment-in-product.html I've installed Go in the Ubuntu distro following...

AppImage created with Qt and linuxdeployqt with gtk3 plugin does not start on Gnome 4

I created a Linux application in Qt 5.15.2 and packaged it to AppImage with linuxdeployqt. I do this on Ubuntu 18.04 virtual machine. The created AppImage runs without any problem on any Linux...