Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexey Murz Korepov MurzNN

View GitHub Profile
@MurzNN
MurzNN / .xbindkeysrc
Created Feb 21, 2021
Changing keyboard layout in Linux KDE + Electron apps via Alt+Shift workaround
View .xbindkeysrc
# Add this to file in home folder
"~/bin/layout-switch.sh"
Alt + Shift_L
@MurzNN
MurzNN / synapse-db-fix-duplicates.sql
Last active Jan 11, 2021
Fix duplicated rows in Synapse PostgreSQL database
View synapse-db-fix-duplicates.sql
# ERROR:  could not create unique index "current_state_events_room_id_type_state_key_key"
# DETAIL:  Key (room_id, type, state_key)=(!JoceisEAQRNMtpWVGm:matrix.org, m.room.member, @_oftc_haagch:matrix.org) is duplicated.
SELECT
room_id, type, state_key,
COUNT( * )
FROM
current_state_events
GROUP BY
room_id, type, state_key
HAVING
@MurzNN
MurzNN / fTXAwIMe5PiohWcL9xDPC.json
Last active Jun 9, 2020
mbalabash/estimo test 1 - ticount chrome 79
View fTXAwIMe5PiohWcL9xDPC.json
{"traceEvents":[{"pid":323769,"tid":323783,"ts":51107471893,"ph":"X","cat":"toplevel","name":"ThreadPool_RunTask","dur":310,"tdur":305,"tts":1909,"args":{"src_file":"../../services/tracing/public/cpp/perfetto/task_runner.cc","src_func":"PostTask"}},
{"pid":323769,"tid":323783,"ts":51107472525,"ph":"X","cat":"toplevel","name":"ThreadPool_RunTask","dur":40,"tdur":39,"tts":2535,"args":{"src_file":"../../services/tracing/public/cpp/perfetto/task_runner.cc","src_func":"PostTask"}},
{"pid":323769,"tid":323783,"ts":51107474809,"ph":"X","cat":"toplevel","name":"ThreadPool_RunTask","dur":44,"tdur":44,"tts":2628,"args":{"src_file":"../../services/tracing/public/cpp/perfetto/task_runner.cc","src_func":"PostTask"}},
{"pid":323769,"tid":323783,"ts":51107488988,"ph":"X","cat":"toplevel","name":"ThreadPool_RunTask","dur":92,"tdur":93,"tts":2746,"args":{"src_file":"../../services/tracing/public/cpp/perfetto/task_runner.cc","src_func":"PostTask"}},
{"pid":323769,"tid":323783,"ts":51107594127,"ph":"M","cat":"__metadata","name"
@MurzNN
MurzNN / trace.json
Created Jun 2, 2020
Chromium ticount test - trace.json
View trace.json
{"traceEvents":[
{"args":{"name":"CrGpuMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":546918,"tid":546918,"ts":0},
{"args":{"name":"CrRendererMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":546940,"tid":546940,"ts":0},
{"args":{"name":"CrBrowserMain"},"cat":"__metadata","name":"thread_name","ph":"M","pid":546901,"tid":546901,"ts":0},
{"args":{"name":"Chrome_ChildIOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":546918,"tid":546936,"ts":0},
{"args":{"name":"Chrome_IOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":546901,"tid":546907,"ts":0},
{"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":546918,"tid":546931,"ts":0},
{"args":{"name":"Chrome_ChildIOThread"},"cat":"__metadata","name":"thread_name","ph":"M","pid":546940,"tid":546947,"ts":0},
{"args":{"name":"ThreadPoolForegroundWorker"},"cat":"__metadata","name":"thread_name","ph":"M","pid":546940,"tid":546946,"ts":0},
{"args":{"name":"ThreadPoolForeg
@MurzNN
MurzNN / element-web-update.sh
Last active Sep 22, 2020
element-web-update.sh - bash script for auto-update web version of Element IM to latest version from GitHub vector-im/element-web project releases
View element-web-update.sh
#!/bin/bash
###################################################################
# Script for check new version of Element from github
# and download new version, if update is avaiable
#
# https://gist.github.com/MurzNN/ee64f98ab2e71b886c41d55594e5dd9e
#
###################################################################