Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Setup Fluid on Ubuntu (https://github.com/lirios/fluid)
# Tested on Ubuntu 16.04 and Ubuntu 16.10 with Qt 5.7
#
# You may use this script freely if you find it useful. Please note
# that it comes with absolutely no warranty though.
#
# MIT License
#
@timsueberkrueb
timsueberkrueb / cmake_android.patch
Created January 9, 2017 17:23
Patch Qt 5.7 for CMake Android
@@ -98,7 +98,7 @@ set(Qt5_DISABLED_FEATURES
set_property(TARGET Qt5::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>)
-set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)
+#set_property(TARGET Qt5::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)
set(QT_VISIBILITY_AVAILABLE "True")
@timsueberkrueb
timsueberkrueb / qt_bin_gen_snapcraft.py
Created March 3, 2017 11:17
[Experiment] Script generating snapcraft.yaml for a platform snap including Qt binaries from qt.io
#!/usr/bin/python3
import yaml
from typing import Dict
from collections import OrderedDict
# Add YAML representer to handle OrderedDict
# See http://stackoverflow.com/a/21912744
def represent_ordereddict(dumper, data):
@timsueberkrueb
timsueberkrueb / childrencontainer.cpp
Created August 16, 2017 10:02
Simple C++-QObject with QML children (using the "data" property only)
#include "childrencontainer.h"
ChildrenContainer::ChildrenContainer(QObject *parent) : QObject(parent)
{
}
QQmlListProperty<QObject> ChildrenContainer::data()
{
return QQmlListProperty<QObject>(
@timsueberkrueb
timsueberkrueb / install.sh
Last active April 10, 2018 20:36
Simple installation script for material-browser
# liri-browser installation script
# (C) Copyright 2015 by Tim Süberkrüb
# Modifications by Joshua Holland
set -e # This makes (haha) the script exit when make'ing liri-browser fails, but is good for debugging.
# Also, if a command can't complete, we avoid trying to continue and potentially clobbering stuff.
echo "Welcome to the liri-browser installer!"
mkdir liri-browser-installer && cd liri-browser-installer # Keep files in a separate directory, i.e. don't clog up ~/Downloads/
# Download & install Qt 5.5
echo -n "Is Qt 5.5 already installed? [y/n] " # If so, don't bother downloading the installer.
@timsueberkrueb
timsueberkrueb / qmetaobject-rs.patch
Last active January 6, 2019 12:59
Qt & Rust & Ubuntu touch
diff --git a/qmetaobject/src/qmetatype.rs b/qmetaobject/src/qmetatype.rs
index bc20a98..25ff21a 100644
--- a/qmetaobject/src/qmetatype.rs
+++ b/qmetaobject/src/qmetatype.rs
@@ -258,15 +258,9 @@ impl QMetaType for QVariant {
}
qdeclare_builtin_metatype!{QModelIndex => 42}
-#[cfg(target_pointer_width = "32")]
qdeclare_builtin_metatype!{isize => 32} // That's QMetaType::Long
import Data.Vect
import Data.Fin
%default total
%access public export
-- Shortcut operator for application
infixl 7 $$
data Typ : Type where
@timsueberkrueb
timsueberkrueb / yoga910-fix-screen-flickering.md
Last active February 8, 2023 19:44
Fix Screen Flickering on Ubuntu on Lenovo Yoga 910

Fix Screen Flickering on Ubuntu on Lenovo Yoga 910

  • Edit /etc/default/grub

    • Add i915.enable_rc6=0 GRUB_CMDLINE_LINUX_DEFAULT
    • Run sudo update-grub
    • Reboot (optional)
  • Create and edit ~/.drirc:

@timsueberkrueb
timsueberkrueb / build-pyside2-ubuntu.md
Last active November 15, 2023 16:11
Building PySide2 on Ubuntu

Tested on Ubuntu 16.10

Clone the pyside-setup repository and init submodules

git clone https://code.qt.io/pyside/pyside-setup.git
cd pyside-setup
git submodule update --init --recursive