## networking – netplan configuration not applying ethernet LAN

After a power cycle, I’m unable to see my ethernet interfaces in `ifconfig` with the following netplan configuration. `ethMine` shows up in `ip link show`, but is not upped.

``````\$ cat /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
ethMine:
- 192.168.1.67/25
vlans:
ethA.200:
id: 200
wifis:
abcd:
dhcp4: yes
dhcp6: no
gateway4: 10.10.10.1
nameservers:
access-points:
"myssid":
``````
• On Ubuntu desktop.
• There are no other netplan configs.
• `/etc/network/interfaces` is commented out
• Only after a `sudo netplan apply` does the interface come up.
``````\$ dmesg | grep ethMine
(    2.881002) r8169 0000:26:00.1 ethMine: renamed from enp38s0f1
``````

after `sudo netplan apply`:

``````\$ dmesg | grep ethMine
(    2.881002) r8169 0000:26:00.1 ethMine: renamed from enp38s0f1
(  359.512589) r8169 0000:26:00.1 ethMine: Link is Down
(  362.332948) r8169 0000:26:00.1 ethMine: Link is Up - 1Gbps/Full - flow control off
``````

Can I force my netplan apply to run later in case there is a race?

## Need to write junit for configuration class

``````Public class config implements WebMvcConfigurer {

Public void Converters (List<httpMsgConverter<?>> converters) {
Builder builder = new Builder();
Builder.indentOutput(true);
}

Public void addResourceHandlers(final RHRegistry Registry) {
}
}
``````

I am new at this. Any solution would be very much helpful.

## configuration – Best practices for backing up Drupal 8 settings files

I have a Drupal 8 multisite with a few different hosts for production, staging, and local dev. Certain important files like settings.php and .htaccess are excluded from git, making it complicated to push to staging and production from my local. How are people getting around this? Is putting them in .git such a big security risk? For some time, I’ve been excluding .htaccess from .git and creating a .htaccess-loca, .htaccess-prod, etc., putting them in .git and copying them to the .htaccess files on the difference hosts – but these also contain the same info. Not sure why these are a security issue. The .env files I can understand. The problem with settings.php is the contain database passwords; can I move them to .env and consider settings files safe for git? Can drupal console be used for synchronizing these files? I’d rather not use sftp, and like git so I can roll back to known stable versions.

I used composer to build the site, can composer be used to manage settings, env, and other config files?

How about Docsall, would that make things easier?

## X11 configuration on Ubuntu 18.04. Worked on Ubuntu 16.04

Here is a script which is run in cron for user1 who has sudo privileges

``````   export DISPLAY=:0
export XAUTHORITY=/home/user2/.Xauthority
scrot -q 30 "/tmp/%Y-%m-%d-%H-%M_screen.jpg" 2>/tmp/err

``````

It worked fine on Ubuntu 16.04. When upgraded to 18:04, it gives the error: Invalid MIT-MAGIC-COOKIE-1 keygiblib error: Can’t open X display. It is running, yeah?

File .Xauthority is owned by user2, group owned by user1 and has permissions 660.

What changed between Ubuntu 16:04 and 18:04? I tried export DISPLAY=:1.0 instead of export DISPLAY=:0 after reading a post on SO. It gave this error: giblib error: Can’t open X display. It is running, yeah?

## ssl – Apache configuration priority with port 443

I have the configuration below for port 80 that is behaving as expected.

``````# conf below is prioritized and executed when
# vHost does not exist (acts as default)
#
<VirtualHost *:80>
...
</VirtualHost>

# conf below is prioritized and executed when
# vHost is example.com
#
<VirtualHost *:80>
ServerName example.com
...
</VirtualHost>
``````

However when applying the same for port 443 apache does not pick the block with the specified `ServerName` and execute it, instead, all HTTPS connections fail.

``````# I want to act as default when
# vHost does not exist
#
<VirtualHost *:443>
... kept empty to trigger error
</VirtualHost>

# and the conf below for example.com
#
<VirtualHost *:443>
ServerName example.com
...
</VirtualHost>
``````

In simple terms:

``````https://example.com -> should be served fine
https://sub.example.com -> should trigger error because vHost doesn't exist
``````

The SSL configuration is valid, commenting out the first block fixes the problem but doesn’t achieve the desired behavior as for port 80. This may have something to do with the fact that a secure connection needs to be established before transmitting data, but then how apache can pick the right `<VirtualHost *:443>` configuration when there are 2 or more vHosts, each identified by its own `ServerName`, but fails in this case.

## postgresql – wal_level set to replica at database level but i dont see that in configuration file

wal_level is commented in postgresql.conf and i dont see any entry in auto.conf either. but at the databsae level i see its set to REPLICA. Is there any other place whee it could have been set?

``````postgres@postgresqlmaster:/etc/postgresql/12/data\$ psql -p 5433
psql (12.3 (Ubuntu 12.3-1.pgdg18.04+1))
Type "help" for help.

postgres=# select name, setting, sourcefile, sourceline from pg_settings where name = 'wal_level';
name    | setting | sourcefile | sourceline
-----------+---------+------------+------------
wal_level | replica |            |
(1 row)

``````
``````postgres@postgresqlmaster:/etc/postgresql/12/data\$ cat /var/lib/postgresql/12/data/postgresql.auto.conf
# Do not edit this file manually!
# It will be overwritten by the ALTER SYSTEM command.
shared_buffers = '200MB'
synchronous_standby_names = 'pgstandby_synch1'
``````

## complexity theory – Configurations and CNF formula for neighboring configuration

A configuration of a Turing machine $$M$$ which runs in space $$S(n)$$ contains the state, the head positions, and the content of non-blank cells of all the tapes. For $$M$$ and an input $$x$$, we define its configuration graph $$G_{M,x}$$ as a directed graph whose nodes correspond to all the possible configurations and there is an edge from a configuration $$C$$ to $$C’$$ if $$C’$$ can be reached from $$C$$ in one step.

First question:
In Arora-Barak (snapshot below), they say that these nodes can be encoded in a binary string of length $$O(S(n))$$. Such encoding contains the state, all symbols under the head, and non-blank content of work tapes with special marking to denote the location of the head. I think this is not correct since such an encoding doesn’t contain the input head position. If we don’t store the input head position, which requires O(log n) bits, then two nodes can map to the same encoding, which seems wrong. Am I right? Although storing the input head position will not increase the length of the encoding since we are assuming in the book that $$S(n) > log n$$.

Second question: Next Arora-Barak says that we can construct a CNF formula $$phi_{M,x}$$ such that for any two strings $$C$$ and $$C’$$, $$phi_{M,x}(C,C’) = 1$$ iff $$C$$ and $$C’$$ encode two neighboring configuration in $$G_{M,x}$$. I am not able to figure out the proof of this claim with the kind of encoding that I have described above i.e. encoding in which we also store the index of input head. Suppose a configuration C has $$q_1, q_2, dots, q_c$$ bits for state, $$h_1,h_2, dots, h_{O(log n)}$$ bits for input head positions, $$w_1, w_2, dots, w_{S(n)}$$ bits for work tape content and $$wh_1, wh_2, dots, wh_{S(n)}$$ bits for work tape head position, where $$wh_i$$ is equal to 1 if the head is on the $$i$$th cell, else it is equal to 0. Then how with such an encoding we can construct a CNF formula as described at the beginning of this question?

## gui design – Best practice for dealing with configuration conflicts?

I have a problem with applying configuration to 2 groups of devices.
Thee groups can contain the same device. Which will result in conflicts.
Any ideas would be much appreciated.

option1: Allow user to save over existing conflicts – provide confirmation
this causes constant dialogs and a sort of whack-a-mole scenario

option2: Allow user to save over existing conflicts – provide warning only
Device just assumes the last config applied.

option3: Prevent crossover of groups
This is my preference but not the current setup in code, not time to change.

## magento2.3.3 – Magento 2.3 – For testing how to use localhost url into nginx configuration

For testing, we using Magento 2.3.4 in localhost [Centos 7 & Nginx]

Main-store Path & URL:

Path : usr/share/nginx/html/gomart – URL : http:// 192.168.1.64:8077/

Multi-Store URL :

Path : usr/share/nginx/html/gomart/grocery – URL : http:// 192.168.1.64:8077/grocery/

How to setup Multi-Website url into => nginx.conf.sample & index.php & .htaccess

## Touchpad inactive after gestures configuration

I wanted to activate additional gestures on my Dell Vostro laptop, but I did worse than better because my touchpad no longer works at all.
It’s a PS / 2 Generic Mouse but I don’t know if it should use the Synaptics or Libinput drivers.
I tried to uninstall one or the other, I even lost my keyboard, which I found since phew! But the touchpad could not find it.
I’m on Ubunutu 20.04