Skip to content

Instantly share code, notes, and snippets.

View ldvc's full-sized avatar

Ludovic Terrier ldvc

  • 18:45 (UTC +02:00)
View GitHub Profile
@ldvc
ldvc / ejabberd_hook_config_crashed.md
Last active January 4, 2019 09:43
ejabberd - Hook config_reloaded crashed

Got he following after changing log_level from 4 => 3 and ejabberdctl reload_config:

2019-01-04 10:32:15.561 [error] <0.3680.0>@ejabberd_hooks:safe_apply:384 Hook config_reloaded crashed when running ejabberd_rdbms:config_reloaded/0:

** Reason = {error,badarg,[{ets,select_count,[],[sql_pool,[{{sql_pool,'$1','_'},[{'==','$1',{const,<<"example.com">>}}],[true]}]]},{ejabberd_sql_sup,reload,[{file,"src/ejabberd_sql_sup.erl"},{line,76}],1},{lists,foreach,[{file,"lists.erl"},{line,1338}],2},{ejabb

erd_hooks,safe_apply,[{file,"src/ejabberd_hooks.erl"},{line,380}],4},{ejabberd_hooks,run1,[{file,"src/ejabberd_hooks.erl"},{line,329}],3},{ejabberd_ctl,call_command,[{file,"src/ejabberd_ctl.erl"},{line,351}],4},{ejabberd_ctl,try_call_command,[{file,"src/ejabb

erd_ctl.erl"},{line,320}],4},{ejabberd_ctl,process2,[{file,"src/ejabberd_ctl.erl"},{line,270}],4}]}
@ldvc
ldvc / postinstall-mojave.md
Last active October 30, 2018 07:37
Some post installation tasks after installing MacOS Mojave

As admin user:

sudo scutil --set ComputerName "myHostname"
sudo scutil --set LocalHostName "myHostname"
sudo scutil --set HostName "myHostname"

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install tig
brew cask install iterm2
brew cask install alfred
@ldvc
ldvc / apt-downgrade-testing-to-backports.md
Last active February 5, 2020 10:01
Use APT pinning in order to force package downgrade

Reinstall packages (testing → backports)

Temporarily force packages from stretch-backports to be installed even if same version is already installed from testing

cat <<EOF | sudo tee /etc/apt/preferences.d/pinning
Package: erlang*
Pin: release a=stretch-backports
Pin-Priority: 1001
05-02 16:28:03.203 D/conversations(28025): app switched into foreground
05-02 16:28:43.989 D/conversations(28025): ConversationsOverviewFragment.onPause()
05-02 16:28:43.991 D/conversations(28025): ConversationFragment.onAttach()
05-02 16:28:44.025 D/conversations(28025): reInit(hasExtras=true)
05-02 16:28:44.025 D/conversations(28025): trimming conversation
05-02 16:28:44.074 D/conversations(28025): scrolledToBottomAndNoPending=true
05-02 16:28:44.074 D/conversations(28025): jump to first unread message
05-02 16:28:49.896 D/conversations(28025): AxolotlService (usert@myserver.com): Finding devices without session for userq@example.com
05-02 16:28:49.897 D/conversations(28025): AxolotlService (usert@myserver.com): Finding devices without session for userl@myserver.com
05-02 16:28:49.898 D/conversations(28025): AxolotlService (usert@myserver.com): Found device userl@myserver.com:9396475
@ldvc
ldvc / prosody-to-ejabberd-migration.md
Last active December 13, 2019 20:49
Steps for migrating Prosody server to Ejabberd on Debian 9

First redacted on early March 2018.

After some time with Prosody 0.10 on Debian 9, I wanted to test Ejabberd. You'll find below steps for doing such migration.

Steps

Packages installation

The most recent version can be found in Stretch's backports repository:

cat <<EOF | sudo tee /etc/apt/sources.list.d/backports.list
deb http://ftp.debian.org/debian stretch-backports main
@ldvc
ldvc / ansible-ufw.md
Last active April 6, 2020 09:26
Gestion UFW avec Ansible

Ansible + UFW

Config

Contenu du fichier vars_ufw.yml :

---
allow_in:
  - {port: 22, proto: 'tcp'}
  - {port: 25, proto: 'tcp'}
  - {port: 53, proto: 'udp'}
@ldvc
ldvc / prosody-cfg
Created December 22, 2017 09:07
Current Prosody configuration file
-- Prosody XMPP Server Configuration
---------- Server-wide settings ----------
-- Settings in this section apply to the whole server and are the default settings
-- for any virtual hosts
admins = { "admin@example.com" }
-- This is the list of modules Prosody will load on startup.
-- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
@ldvc
ldvc / reinstallation-serveur.md
Last active January 27, 2017 09:26
Procédure de réinstallation d'un serveur dédié perso (web + mail)

Procédure d'installation d'un serveur dédié

Pré-requis

Réinstallation via manager OVH

On commence par lancer la réinstallation depuis le manager OVH. On choisira le partitionnement classique :

  • une partition / de 20Go
  • une partition /home avec le reste de l'espace disponible.

Mise en place LVM

@ldvc
ldvc / keybase.md
Last active October 30, 2015 19:00

Keybase proof

I hereby claim:

  • I am ldvc on github.
  • I am ldvc (https://keybase.io/ldvc) on keybase.
  • I have a public key whose fingerprint is C3EE 7350 F8DF 3480 A0C9 05E0 2192 936B 0FFC E757

To claim this, I am signing this object: