Skip to content

Instantly share code, notes, and snippets.

View a-andreyev's full-sized avatar
🕊️

Alexey Andreyev a-andreyev

🕊️
View GitHub Profile

http://harmful.cat-v.org/software/c++/linus

YOU are full of bullshit.

C is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C++ were to do nothing but keep the C programmers out, that in itself would be a huge reason to use C++.

In other words: the choice of C++ is the only sane choice. I know Linus Torvalds unironically said "to piss you off" about C, but it's actually true.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>sans-serif</family>
<prefer>
<family>Noto Sans</family>
<family>Noto Color Emoji</family>
<family>Noto Emoji</family>
<family>DejaVu Sans</family>
@a-andreyev
a-andreyev / darkPaletteShader.qml
Last active June 18, 2019 16:13
darkPaletteShader for Qt Telegram Chat discussion
SystemPalette {
id: defaultPalette
colorGroup: SystemPalette.Active
property color backgroundColor: defaultPalette.window
property bool backgroundColorIsDark: backgroundColor.hslLightness < 0.5
|| backgroundColor.hslSaturation < -0.8
}
ShaderEffect {
enabled: false
@a-andreyev
a-andreyev / README.md
Last active March 13, 2019 12:15
harbour-pysidetest-mockup

harbour-pysidetest-mockup

@a-andreyev
a-andreyev / opy_config.txt
Last active March 13, 2019 00:07
pyside2 opy_config.txt
'''
Copyright (C) 2014 - 2017 Jacques de Hooge, Geatec Engineering, www.geatec.com
This program is free software.
You can use, redistribute and/or modify it, but only under the terms stated in the QQuickLicence.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY, without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the QQuickLicence at www.qquick.org/licence.html for details.
@a-andreyev
a-andreyev / qt.cfg
Last active February 26, 2019 07:27 — forked from trollixx/qt.cfg
Uncrustify configuration for Qt
# Uncrustify 0.60
#
# Qt specific options
#
set FOR foreach
set FOR forever
#
# General options
@a-andreyev
a-andreyev / main.py
Last active March 13, 2019 11:50
Qt_for_Python_Tutorial_HelloQML
from PySide2.QtWidgets import QApplication
from PySide2.QtQuick import QQuickView
from PySide2.QtCore import QUrl
import resources
app = QApplication([])
view = QQuickView()
url = QUrl("qrc:///view.qml")

Development hints

Adding registered Matrix account to the Telepathy

According to tank.manager via mc-tool from telepathy-mission-control:

mc-tool add tank/matrix <connection-local-name> string:account=<matrix-username> string:user=<local-username> string:password=<matrix-password> string:server=<matrix.org or another> string:device=<device-name>

Check summary:

@a-andreyev
a-andreyev / screentest.sh
Created August 20, 2018 14:18
sailfish pixelRation and screen size test
#!/bin/bash
pkcon refresh
devel-su pkcon install qt5-qtdeclarative-qmlscene
curl -LO https://gist.githubusercontent.com/a-andreyev/5cf78f02f959fb3f40aa6c7089ab762b/raw/f1d6fd3d91ec2db7c2ed8226906b8dafc3a9d7a1/screentest.qml
/usr/lib/qt5/bin/qmlscene screentest.qml
@a-andreyev
a-andreyev / screentest.qml
Created August 20, 2018 14:16
sailfish Screen.sizeCategory and Theme.pixelRatio:
import QtQuick 2.0
import Sailfish.Silica 1.0
Item {
Component.onCompleted: {
console.log("Screen.sizeCategory:",Screen.sizeCategory)
console.log("Theme.pixelRatio:",Theme.pixelRatio)
}
}