April 03 2022, 14:28#

Using a webcam on FreeBSD in web browsers

Lien : https://www.davidschlachter.com/misc/freebsd-webcam-browser

How to use your webcam with Chrome and Firefox in FreeBSD

Installation

pkg inst pwcview v4l-utils v4l_compat webcamd
kldload cuse
sysrc -f /boot/loader.conf cuse_load=YES
sysrc webcamd_enable=YES
pw groupmod webcamd -m user
service devd restart
service webcamd start

A reboot is highly recommended

Then, we can test with pwcview

pwcview -d /dev/video0

Tags : freebsd chromium firefox webcam

January 28 2022, 09:56#

Red Hat Enterprise Linux - How to Manually Re-enable Failed Paths Reported by Multipath

Lien : https://support.hpe.com/hpesc/public/docDisplay?docId=emr_na-c03113986

When running the multipath command several devices report failed paths. After Checking confirmed that the underlying storage devices were all online and available but the device mapper multipath layer did not automatically re-enable the paths. Although a full server reboot would recover access to all paths a non-disruptive manual procedure was preferred that could be performed online.

Supprimer un path

echo 1 > /sys/block/sdcu/device/delete

Puis rescan pour remonter le path

Tags : linux multipath san redhat lun

January 21 2022, 16:17#

Script to Identify LUN ID, WWN or WWID, Vendor name and File systems on any block device in Linux | UnixUtils

Lien : https://unixutils.com/identify-lun-id-wwn-wwid-vendor-name-file-systems-block-device-linux/

#!/bin/bash

# Bash Script to identify disk, Vendor name, Serial & WWN for all kinds of Mounted Block devices

for i in `lsblk | grep disk | egrep -v 'Vx|ram|raw|loop|fd|md|dm-|sr|scd|st' | awk '{ print $1 }'`
do
    lsblk /dev/$i | awk '{print "MOUNT="$NF}' | grep -i '/'
    if [ $? = "0" ]; then
        lsblk /dev/$i | grep disk | awk '{print "BLOCK_SIZE="$4}'
        udevadm info --query=all --name /dev/$i | egrep 'DEVNAME=|ID_VENDOR=|ID_SERIAL_RAW=|ID_WWN=|ID_PATH=|ID_SCSI_SERIAL=' | awk '{ print $2 }'
        echo "--------------"
    fi
done

Tags : linux lun wwn multipath powerpath lsblk shell script san

January 20 2022, 16:11#

Best BAKA compilation in anime - YouTube

Lien : https://www.youtube.com/watch?v=h2LKE7SUDZM

Tout est dans le titre :)

Tags : anime baka vidéo youtube

January 19 2022, 15:19#

Tester la vitesse de transfert de données entre deux serveurs

On envoi un demi giga environ pour voir à quelle vitesse c'est transféré.

dd if=/dev/zero bs=1024k count=512 | ssh user@remote.host 'cat >> /dev/null'

Tags : unix dd ssh réseau performance serveur

January 19 2022, 13:16#

Linux and Unix Test Disk I/O Performance With dd Command

Lien : https://www.cyberciti.biz/faq/howto-linux-unix-test-disk-performance-with-dd-command/

  • How can I use dd command on a Linux to test I/O performance of my hard disk drive?
  • How do I check the performance of a hard drive including the read and write speed on a Linux operating systems?
  • How can I use the dd command under Linux I/O performance test?

Exemple de test de performance écriture disque avec dd

dd if=/dev/zero of=test.file bs=64M count=16 oflag=dsync

Tags : linux unix dd performance disque hdd ssd

January 07 2022, 11:33#

GitHub - awesome-selfhosted/awesome-selfhosted: A list of Free Software network services and web applications which can be hosted on your own servers

Lien : https://github.com/awesome-selfhosted/awesome-selfhosted

A list of Free Software network services and web applications which can be hosted on your own servers - GitHub - awesome-selfhosted/awesome-selfhosted: A list of Free Software network services and web applications which can be hosted on your own servers

Tags : self-hosting logiciel open-source github

January 05 2022, 09:27#

shell - Pipe input into a script - Stack Overflow

Lien : https://stackoverflow.com/questions/19408649/pipe-input-into-a-script/46726373#46726373

Alimenter un script depuis stdin :

#!/bin/bash
# Check to see if a pipe exists on stdin.
if [ -p /dev/stdin ]; then
        echo "Data was piped to this script!"
        # If we want to read the input line by line
        while IFS= read line; do
                echo "Line: ${line}"
        done
        # Or if we want to simply grab all the data, we can simply use cat instead
        # cat
else
        echo "No input was found on stdin, skipping!"
        # Checking to ensure a filename was specified and that it exists
        if [ -f "$1" ]; then
                echo "Filename specified: ${1}"
                echo "Doing things now.."
        else
                echo "No input given!"
        fi
fi

Tags : unix shell script

December 31 2021, 11:20#

RainLoop Webmail

Lien : https://www.rainloop.net/

RainLoop Webmail - Simple, modern & fast web-based email client.

Note sur le chiffrement de mail :

Pour chiffrer/signer un mail, il faut avant tout importer les clés publiques et privées.

Pour ma part, j'ai exporté les clés au format ASCII pour pouvoir les importer dans RainLoop.

Exporter la clé publique

gpg --output pubkey.txt --armor --export mail@example.com

Exporter la clé privée

gpg --output private.txt --armor --export-secret-key mail@example.com

Reste plus qu'à copier/coller le contenu des fichiers texte générés dans le formulaire Importer la clé OpenPGP.

Tags : mail webmail php gpg openpgp chiffrement cybersécurité imap smtp

December 31 2021, 11:16#

Polar ProTrainer

Ci-dessous, une vieille note sur l'installation de Polar ProTrainer 5 sur Ubuntu Linux 18.04 à l'aide de Wine.

Installation de Wine

Avant d'installer Wine, il faut s'assurer d'avoir accès aux paquets pour les architectures 32-bit (i386) :

sudo dpkg --add-architecture i386

Ajout des dépôts de WineHQ

wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'

Installation du paquet libfaudio0

wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/i386/libfaudio0_19.07-0~bionic_i386.deb
sudo dpkg -i libfaudio0_19.07-0~bionic_i386.deb
sudo apt-get install -f

Installation de Wine

sudo apt install --install-recommends winehq-stable

Installation de la dernière version de winetricks

sudo apt install cabextract libmspack0
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod 750 winetricks

Préparation de la bouteille Wine

export WINEPREFIX=$HOME/.wine-PolarProTrainer5
WINEARCH=win32 ./winetricks win7

Récupérer le setup de Polar ProTrainer 5

wget https://service.polar.com/downloads/protrainer5/setup_5_40_171.exe

Installation de Polar ProTrainer 5

wine setup_5_40_171.exe

Tags : logiciel ubuntu wine sport

December 31 2021, 11:12#

Garmin Express

Ci-dessous, une vieille note sur l'installation de Garmin Express :

Installer Garmin Express sur Ubuntu Linux 18.04 à l'aide de Wine.

Avant d'installer Wine, il faut s'assurer d'avoir accès aux paquets pour les architectures 32-bit (i386) :

sudo dpkg --add-architecture i386

Ajout des dépôts de WineHQ

wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'

Installation du paquet libfaudio0

wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/i386/libfaudio0_19.07-0~bionic_i386.deb
sudo dpkg -i libfaudio0_19.07-0~bionic_i386.deb
sudo apt-get install -f

Installation de Wine

sudo apt install --install-recommends winehq-stable

Installation de la dernière version de winetricks

sudo apt install cabextract libmspack0
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
chmod 750 winetricks

Préparation de la bouteille Wine

export WINEPREFIX=$HOME/.wine-GarminExpress
WINEARCH=win32 ./winetricks cabinet corefonts vcrun2010 dotnet472
./winetricks win7

Récupérer le setup de Garmin Express

wget https://download.garmin.com/omt/express/GarminExpress.exe

Installation de Garmin Express

wine explorer /desktop=garmin,1024x768 GarminExpress.exe

Lien utile : https://www.christitus.com/garmin-express-linux/

Tags : gps garmin logiciel wine ubuntu

December 31 2021, 11:03#

Free Accounting Software - Akaunting

Lien : https://akaunting.com/

Akaunting is a free, open-source, and online accounting software for small businesses and freelancers. Send invoices and track expenses.

Note du 13 avril 2020 :

Après installation, pour faire fonctionner HTTPS via HAProxy :

cd /var/www/akaunting
sudo -u www /usr/local/bin/php artisan vendor:publish --provider="Fideloper\Proxy\TrustedProxyServiceProvider"

Puis modifier config/trustedproxy.php pour ajouter l'IP de HAProxy

Tags : comptabilité open-source logiciel web freebsd apache haproxy

December 31 2021, 08:26#

Knarfworld | Science-fiction humoristique en MP3 et en BD

Lien : https://www.knarfworld.net/

Tags : mp3 naheulbeuk saga audio

December 31 2021, 08:25#

Donjon de Naheulbeuk OFFICIEL - News et téléchargement

Lien : http://www.penofchaos.com/warham/donjon.htm

Tags : mp3 naheulbeuk saga audio

December 30 2021, 16:08#

DragonFlyBSD: RunSecureBrowser

Lien : https://www.dragonflybsd.org/docs/handbook/RunSecureBrowser/

Tags : unix bsd cybersécurité firefox

December 30 2021, 15:52#

CSS truncate Text with Ellipsis(...) [2020 Tutorial]

Lien : https://daily-dev-tips.com/posts/css-truncate-text-with-ellipsis/

Tronquer du texte avec CSS

Exemple

.truncate {
  width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

Tags : css web

December 30 2021, 15:49#

Créer une miniature carrée sur fond noir en respectant le ratio

Comme l'évoque le titre, cette commande permet de créer une miniature en respectant le ratio de l'image d'origine.

Ce qui veut dire que si l'image est rectangulaire, la miniature le sera aussi.

Donc si on a besoin d'une miniature carrée tout en respectant le ratio, voici une solution testée sur plus de 500 images :

convert -background '#000' -gravity center image.jpg -resize 200x200 -extent 200x200 thumbnail.jpg

Tags : unix imagemagick image photo

December 30 2021, 15:47#

Créer une miniature en redimensionnant l'image uniquement sur la largeur

J'ai un cas d'usage simple : sur Mastodon les images sont automatiquement redimensionnées à l'affichage, sur la largeur uniquement pour conserver le ratio d'origine. En d'autres mots le poids des images est inchangé alors qu'on les voit en 520x.

Une image de 3000x2300 par exemple, pèse plusieurs Mo, tandis qu'une image en 520x pèse quelques Ko.

L'affichage de l'image sur Mastodon se fait toujours en 520x quelque soit la taille de l'image.

Du coup, le fait de redimensionner l'image directement allège considérablement son poids.

En résumé, image plus légère, même rendu, les utilisateurs sur mobile vous remercieront jamais assez.

convert -resize 520x image.jpg thumbnail.jpg

Tags : unix imagemagick mastodon image photo

December 30 2021, 15:45#

[Résolu] Écrire du texte dans une image avec imagemagick - Programmation - Zebulon

Lien : https://forum.zebulon.fr/topic/121931-resolu-ecrire-du-texte-dans-une-image-avec-imagemagick/

Écrire du texte dans une image

convert image.jpg -font Bookman-DemiItalic -draw "text 40,34 'Exemple de texte'" exemple.jpg

Tags : unix imagemagick image photo

December 30 2021, 15:44#

Resize on largest side - ImageMagick

Lien : https://legacy.imagemagick.org/discourse-server/viewtopic.php?p=44329#p44329

Cette commande permet de créer une miniature carrée à partir du centre indépendamment du ratio de l'image d'origine.

convert image.jpg -resize '250^>' -gravity center -crop 250x250+0 mini.jpg

Tags : unix imagemagick image photo