Skip to content

Instantly share code, notes, and snippets.

@BBavouzet
BBavouzet / debian-ubuntu-php-yaz.md
Created November 16, 2023 16:40 — forked from RatserX/debian-ubuntu-php-yaz.md
Setup PHP YAZ on Debian/Ubuntu using PECL

Setup PHP YAZ on Debian/Ubuntu using PECL

Prerequisites

Update the installed packages.

apt update

Install the Ondřej PHP repository.

apt install software-properties-commonsudo

add-apt-repository ppa:ondrej/php

@BBavouzet
BBavouzet / favoriteAppGMenu.md
Created April 8, 2020 14:00
Add in gnome menu favorite application whith CLI
gsettings set org.gnome.shell favorite-apps "$(gsettings get org.gnome.shell favorite-apps | sed s/.$//), 'appname.desktop']"
@BBavouzet
BBavouzet / Time-on-dual-boot.MD
Last active March 22, 2020 10:26
Set Clock Time on Dual-Boot Systems

If you're dual-booting Ubuntu 18.04 and Windows 10, you may find that changing time in one system affects the other and the two systems can't display the same time.

This happens as Ubuntu interprets the hardware clock or real time clock (RTC) in universal time (UTC) by default while Windows 10 maintains the clock in local time.

You can fix this by keeping RTC in local time in Ubuntu by running a command in the terminal below.

timedatectl set-local-rtc 1 --adjust-system-clock

To undo this setting, enter the command below.

@BBavouzet
BBavouzet / ubuntu multi sound devives.md
Last active March 22, 2020 10:27
Set default input device sound in Ubuntu and make it persistent.

I have multiple output device sound and it's allways my headphone by default.

  1. First: List the audio output devices using

pactl list short sources

  1. Second: To set a default output device run the command

pactl set-default-sink <'output_device_name'> Where output_device_name is until .monitor

@BBavouzet
BBavouzet / pluginsWordpressDesactiver.md
Created October 30, 2018 18:31
Desactiver plugins wordpress

UPDATE wp_options SET option_value = '' WHERE option_name = 'active_plugins';

@BBavouzet
BBavouzet / Docker mysql restore backup.md
Last active November 18, 2018 10:46
Docker mysql restore/backup database from host bash

Restore :

docker exec -i CONTAINER mysql -u USER -pPASSWORD DATABASE < BACKUP.SQL

Backup :

docker exec -i CONTAINER mysqldump -u USER -pPASSWORD DATABASE &gt; BACKUP.SQL

La première étape consiste à se connecter au site [QT creator](https://www.qt.io/download/) afin de télécharger le projet open source correspondant à votre distribution (32 ou 64bits). Vous pouvez également le télécharger en ligne de commande et le rendre executable et l'exécuter:
wget http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run
chmod +x qt-opensource-linux-x64-online.run
./ qt-opensource-linux-x64-online.run
Un fenêtre apparaîtra vous indiquant la marche à suivre.
Selectionnez l'emplacement de l'installation /home/lib/qt
Cochez Qt5.3, Tools, Qt extras
Puis validez.
@BBavouzet
BBavouzet / gogs
Last active September 5, 2018 05:19 — forked from infostreams/gogs
Debian startup (init.d) script for gogs.io
#! /bin/sh
### BEGIN INIT INFO
# Provides: gogs
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Git repository manager Gogs
# Description: Starts and stops the self-hosted git repository manager Gogs
### END INIT INFO