Skip to content

Instantly share code, notes, and snippets.

View zinid's full-sized avatar

Evgeny Khramtsov zinid

View GitHub Profile
@RishiRaj22
RishiRaj22 / gsoc_2018.md
Last active August 15, 2018 21:23
GSoC 2018: XMPP Compliance Tester

GSoC 2018: XMPP Compliance Tester

The main goal of this project was to create a web application to check compliance of XMPP servers with XEPs (XMPP Extension Protocols) based off of the existing XMPP Compliance Tester tool. A new repository was created for this project, as using the old one was not feassible due to major structural changes. This new repository can be found at https://github.com/iNPUTmice/caas

It contains all of the code written as a part of the GSoC project.

Here is the list of the proposed deliverables, along with their status at the end of the GSoC period:

@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
-module(mod_isolation).
-behaviour(gen_mod).
%% gen_mod callbacks
-export([start/2, stop/1, mod_options/1, depends/2]).
%% hooks
-export([filter_packet/1]).
-include("xmpp.hrl").
@tsaarni
tsaarni / openssl-notes.txt
Created October 22, 2016 08:50
Generate self-signed certs with different key types
*** RSA
# Generate self-signed certificate with RSA 4096 key-pair
openssl req -x509 -nodes -days 3650 -newkey rsa:4096 -keyout rsakey.pem -out rsacert.pem
# print private and public key
openssl rsa -in rsakey.pem -text -noout
# print certificate
openssl x509 -in rsacert.pem -text -noout
@shepmaster
shepmaster / README.md
Last active March 11, 2020 05:21 — forked from kelcecil/README.md
Implementation of binary search tree in OCaml and Rust (modeled after the OCaml solution).

Here's two implementations of a binary search tree in OCaml and Rust. The Rust version was written to deliberately look as close to the OCaml as possible (and it'd get pretty close if I used match instead of OCaml's variants). I'm pretty sure my OCaml implementation is idiomatic, and I'd like some advice on what steps I'd probably take to make the Rust example more idiomatic. My objective is to talk about how close the examples can be to each other as well as how different the examples can be (hopefully demonstrating strengths for both.)

Any other thoughts or ideas are also helpful and super appreciated!

@pkuczynski
pkuczynski / parse_yaml.sh
Last active April 9, 2024 18:36
Read YAML file from Bash script
#!/bin/sh
parse_yaml() {
local prefix=$2
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034')
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 |
awk -F$fs '{
indent = length($1)/2;
vname[indent] = $2;
for (i in vname) {if (i > indent) {delete vname[i]}}