Skip to content

Instantly share code, notes, and snippets.

☠️

Evgeny Khramtsov zinid

☠️
Block or report user

Report or block zinid

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View foo.xml
<!-- Outgoing Fri 16 Nov 2018 11:24:24 MSK -->
<iq xmlns="jabber:client" to="conversations@conference.siacs.eu/anjan" type="get" id="1" from="xram@zinid.ru/gajim.51FA9AFS">
<time xmlns="urn:xmpp:time" />
</iq>
<!-- Outgoing Fri 16 Nov 2018 11:24:24 MSK -->
<r xmlns="urn:xmpp:sm:3" />
<!-- Incoming Fri 16 Nov 2018 11:24:24 MSK -->
<a h="387" xmlns="urn:xmpp:sm:3" />
View mosquitto-pubrel-unknown.log
1534280285: New client connected from 192.168.1.1 as rtb371 (c0, k60, u'user371@domain.tld').
1534280285: Sending CONNACK to rtb371 (1, 0)
1534280285: Sending PUBLISH to rtb371 (d0, q2, r0, m9, '/rtb/user371', ... (4 bytes))
1534280285: Received PUBLISH from rtb371 (d0, q2, r0, m38300, '/rtb/user991', ... (6 bytes))
1534280285: Received PUBREC from rtb371 (Mid: 9)
1534280285: Sending PUBREL to rtb371 (Mid: 9)
1534280285: Socket error on client rtb371, disconnecting.
1534280288: Client rtb371 disconnected.
1534280288: New client connected from 192.168.1.1 as rtb371 (c0, k60, u'user371@domain.tld').
1534280288: Sending CONNACK to rtb371 (1, 0)
View mysql.sql.diff
diff --git a/sql/mysql.sql b/sql/mysql.sql
index 3fddea510..7894fa5b7 100644
--- a/sql/mysql.sql
+++ b/sql/mysql.sql
@@ -102,10 +102,10 @@ CREATE TABLE archive (
) ENGINE=InnoDB CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE FULLTEXT INDEX i_text ON archive(txt);
-CREATE INDEX i_username USING BTREE ON archive(username);
+CREATE INDEX i_username_timestamp USING BTREE ON archive(username(191), timestamp);
View ejabberd.yml
###
### ejabberd configuration file
###
### The parameters used in this configuration file are explained at
###
### https://docs.ejabberd.im/admin/configuration
###
### The configuration file is written in YAML.
### *******************************************************
### ******* !!! WARNING !!! *******
View gajim.shit
xram@zinid ~> /usr/lib/python3/dist-packages/gajim/common/app.py:228: Warning: ../../../../gobject/gsignal.c:2523: sign
session = conference.new_session(Farstream.MediaType.AUDIO)
/usr/lib/python3/dist-packages/gajim/common/app.py:228: Warning: ../../../../gobject/gsignal.c:2523: signal 'request-rt
session = conference.new_session(Farstream.MediaType.AUDIO)
/usr/lib/python3/dist-packages/gajim/common/app.py:228: Warning: ../../../../gobject/gsignal.c:2523: signal 'request-rt
session = conference.new_session(Farstream.MediaType.AUDIO)
/usr/lib/python3/dist-packages/gajim/common/app.py:228: Warning: ../../../../gobject/gsignal.c:2523: signal 'request-rt
session = conference.new_session(Farstream.MediaType.AUDIO)
/usr/lib/python3/dist-packages/gajim/common/app.py:228: Warning: g_signal_handler_disconnect: assertion 'handler_id > 0
session = conference.new_session(Farstream.MediaType.AUDIO)
View mod_foo.erl
%%%-------------------------------------------------------------------
%%% @author xram <xram@debian.zinid.ru>
%%% @copyright (C) 2018, xram
%%% @doc
%%%
%%% @end
%%% Created : 28 Mar 2018 by xram <xram@debian.zinid.ru>
%%%-------------------------------------------------------------------
-module(mod_foo).
-behaviour(gen_mod).
View zinid.ml
(** Need ocaml >= 4.04
Compile:
$ ocamlopt -unsafe -o zinid zinid.ml *)
let rec split keys values =
match input_line stdin with
| exception _ ->
(keys, values)
| s ->
match String.split_on_char ' ' s with
| [k; v] ->
View zinid.rl
/*
* Compile:
* $ ragel -G2 zinid.rl -o zinid.c
* $ gcc -O2 zinid.c -o zinid
*/
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
View mod_s2s_log.erl
%%%----------------------------------------------------------------------
%%% File : mod_s2s_log.erl
%%% Author : Mickael Remond <mremond@process-one.net>
%%% Purpose : Log all s2s connections in a file
%%% Created : 14 Mar 2008 by Mickael Remond <mremond@process-one.net>
%%% Usage : Add the following line in modules section of ejabberd.cfg:
%%% {mod_s2s_log, [{filename, "/path/to/s2s.log"}]}
%%%
%%%
%%% ejabberd, Copyright (C) 2002-2008 ProcessOne
View hooks_type_test.erl
-module(hooks_type_test).
%% run hooks
-export([backend_api_call/3,
backend_api_error/3,
backend_api_response_time/4,
backend_api_timeout/3,
caps_add/3,
caps_update/3,
component_connected/1,
You can’t perform that action at this time.