3 liens privés
Error in subbash :
export extractor_version=$(cd extractor; mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
result in output contains colors output :
1.0'$'\033''[0m.tar.gz'
Remove it with :
./somescript | sed -r "s/\x1B\[([0-9]{1,3}(;[0-9]{1,2};?)?)?[mGK]//g"
Dump cache values
unbound-control dump_cache
Installation :
(https://memo-linux.com/debian-installer-le-serveur-dns-unbound/)
apt install unbound
cd /var/lib/unbound/
wget ftp://ftp.internic.net/domain/named.cache
mv named.cache root.hints && chown unbound:unbound root.hints
mv /etc/unbound/
unbound.conf.d/root-auto-trust-anchor-file.conf root-auto-trust-anchor-file.conf.original
mkdir /var/log/unbound
chown unbound: /var/log/unbound
# modify apparmor (see at the end)
systemctl restart unbound
Configuration file:
server:
statistics-interval: 0
extended-statistics: yes
statistics-cumulative: yes
verbosity: 3
interface: 127.0.0.1
port: 53
do-ip4: yes
do-ip6: yes
do-udp: yes
do-tcp: yes
access-control: 127.0.0.0/8 allow ## j'autorise mon serveur
access-control: 0.0.0.0/0 refuse ## j'interdis tout le reste de l'Internet !
auto-trust-anchor-file: "/var/lib/unbound/root.key"
root-hints: "/var/lib/unbound/root.hints"
hide-identity: yes
hide-version: yes
harden-glue: yes
harden-dnssec-stripped: yes
use-caps-for-id: yes
cache-min-ttl: 3600
cache-max-ttl: 86400
prefetch: yes
num-threads: 6
msg-cache-slabs: 16
rrset-cache-slabs: 16
infra-cache-slabs: 16
key-cache-slabs: 16
rrset-cache-size: 256m
msg-cache-size: 128m
so-rcvbuf: 1m
unwanted-reply-threshold: 10000
do-not-query-localhost: yes
val-clean-additional: yes
#use-syslog: yes
#val-log-level:2 (0: default, nothing, 2: full)
logfile: /var/log/unbound/unbound.log
harden-dnssec-stripped: yes
cache-min-ttl: 3600
cache-max-ttl: 86400
prefetch: yes
prefetch-key: yes
And an additional apparmor configuration to be able to write in a dedicated file :
(https://b4d.sablun.org/blog/2018-09-27-when-unbound-wont-write-logs/)
vim /etc/apparmor.d/local/usr.sbin.unbound
# Site-specific additions and overrides for usr.sbin.unbound.
# For more details, please see /etc/apparmor.d/local/README.
/var/log/unbound/unbound.log rw,
A tester.
Partage d'écran et prise de commande à distance (dont android)
Sous le coude: Choisir ses clés primaires sous Postgres.
via sebsauvage (https://sebsauvage.net/links/?vtwJpQ)
Open a H2 database :
java -jar com.h2database.h2-2.1.214.jar
or squirrelSQL
add driver with com.h2database.h2-2.1.214.jar.
Default credentials
login : sa
password : password
UPDATE OCTOER 2022
If you want to quickly start the Restore process and don't care about having that option always enabled, then just fire up the Developer console on the browser and run this while on the Restore page
var modelimport = new Ai1wm.Import();
var storage = Ai1wm.Util.random(12);
var options = Ai1wm.Util.form('#ai1wm-backups-form').concat({ name: 'storage', value: storage }).concat({ name: 'archive', value: 'REPLACE-WITH-ARCHIVE-NAME'});
// Set global params
modelimport.setParams(options);
// Start import
modelimport.start();
Limits the used bandwidth, specified in Kbit/s.
scp -l 1000 file user@remote:/path/to/dest/
Reminder classloader, classname :
Exit0.class.getSimpleName() = Exit0
Exit0.class.getCanonicalName() = com.gorki.Exit0
<instance>.getClass().getSimpleName() =
<instance>.getClass().getCanonicalName() = null
<instance>.getClass().getName() = com.gorki.Exit0$1
<instance>.getClass().getTypeName() = com.gorki.Exit0$1
<instance>.getClass().getPackage().getName() = com.gorki
<instance>.getClass().isAnonymousClass() = true
With :
package com.gorki;
import java.util.ArrayList;
import java.util.Random;
public class Exit0 {
public static void main(String... args) {
Runnable t = new Runnable() {
@Override
public void run() {
}
};
System.out.println("Exit0.class.getSimpleName() = " + Exit0.class.getSimpleName());
System.out.println("Exit0.class.getCanonicalName() = " + Exit0.class.getCanonicalName());
System.out.println("<instance>.getClass().getSimpleName() = " + t.getClass().getSimpleName());
System.out.println("<instance>.getClass().getCanonicalName() = " + t.getClass().getCanonicalName());
System.out.println("<instance>.getClass().getName() = " + t.getClass().getName());
System.out.println("<instance>.getClass().getTypeName() = " + t.getClass().getTypeName());
System.out.println("<instance>.getClass().getPackage().getName() = " + t.getClass().getPackage().getName());
System.out.println("<instance>.getClass().isAnonymousClass() = " + t.getClass().isAnonymousClass());
}
}
pop culture
merci sebsauvage (comment souvent)
Search for microsoft activation kit (official online download and installation)
https://github.com/massgravel/
See licence key at
https://www.cjs-cdkeys.com
Best practices shell, to improve :
When printing error messages, please redirect to stderr.
Use echo 'Something unexpected happened' >&2 for this.
And also :
Use set -o xtrace, with a check on $TRACE env variable.
For copy-paste: if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace; fi.
This helps in debugging your scripts, a lot. Like, really lot.
People can now enable debug mode, by running your script as TRACE=1 ./script.sh instead of ./script.sh.
The problem is most engineers don’t want to do operations work.
So true ! I'm interested in. I want to know how OPs work. I don't want to do it every day :D
Test htaccess rules
Outil de comparaison voiture électrique/thermique :
Epub
Generate a self certificate without adding altName with the IP can lead to an error
The reason this error in java 1.8.0_181 is because this update includes security improvements for LDAP support
-Dcom.sun.jndi.ldap.object.disableEndpointIdentification=true
Java class to test SSL
Additional parameter :
-Djavax.net.debug=ssl,handshake
-Djavax.net.debug=ssl,manager
-Djavax.net.debug=all
A lire
Architecture logicielle
DWService
# check that name is a valid variable name:
# note: this code does not support variable_name[index]
shopt -s globasciiranges
[[ "$name" == [a-zA-Z_]*([a-zA-Z_0-9]) ]] || exit
value='babibab'
eval "$name"='$value' # carefully escape the right-hand side!
echo "$var_37" # outputs “babibab”