Skip to content

Instantly share code, notes, and snippets.

# Config for Nexus4 on CM-10.1
# Tell hybris to use hwcomposer to allow eglfs for Qt to use hwcomposernativewindow
EGL_PLATFORM=hwcomposer
# and Qt to use hwcomposer (note this needs a qpa hwcomposer plugin (qt5-qpa-hwcomposer-plugin))
QT_QPA_PLATFORM=hwcomposer
# which looks like this on the mako
QT_QPA_EGLFS_DEPTH=32
QT_QPA_EGLFS_HIDECURSOR=0
# Both /dev/fb0 and hwc gives us bogus values for physical size, so hardcode them.
[nemo@Jolla-1 ~]$ sudo sshd -T | grep "\(ciphers\|macs\|kex\)"
Пароль:
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key
ciphers aes128-cbc,chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
macs umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
kexalgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
@CODeRUS
CODeRUS / aak
Last active September 13, 2017 09:23
rand stuff
Made4of5Hate!
DialogPage.qml
Page {
id: page
...
property var callback
...
// some place where you need callback:
page.callback("some", "very", "important", "params")
}
[alias]
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
#!/usr/bin/python -u
'''
Copyright 2009, The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@CODeRUS
CODeRUS / test.qml
Created August 21, 2016 11:57
do not try this at home
Repeater {
model: 1000
delegate: Image {
width: parent.width
height: width
source: "file:///home/nemo/Pictures/Camera/20160821_003.jpg"
cache: false
}
}
@CODeRUS
CODeRUS / main.qml
Created August 25, 2016 03:58
Material Circle Animations
import QtQuick 2.5
import QtQuick.Window 2.2
import QtQuick.Controls 1.4
Window {
visible: true
Rectangle {
id: indicatorRect
width: Math.min(parent.width, parent.height)
@CODeRUS
CODeRUS / journalcat.py
Last active November 25, 2016 08:28
JournalCat
#!/usr/bin/env python3
'''
Copyright 2016, Andrey Kozhevnikov coderusinbox@gmail.com
'''
# journalcat
# Script to highlight journalctl output for console
# With respect to Android AOSP project pidcat script
@CODeRUS
CODeRUS / hueShift.js
Last active November 29, 2016 19:15
QML hueShift
function rgbToHsv(r, g, b) {
r = r/255, g = g/255, b = b/255;
var max = Math.max(r, g, b), min = Math.min(r, g, b);
var h, s, v = max;
var d = max - min;
s = max == 0 ? 0 : d / max;
if (max == min) {
h = 0; // achromatic