Skip to content

Instantly share code, notes, and snippets.

import Data.Vect
import Data.Fin
%default total
%access public export
-- Shortcut operator for application
infixl 7 $$
data Typ : Type where
@timsueberkrueb
timsueberkrueb / Cargo.toml
Last active February 28, 2024 16:34
Rust build.rs file to compile SASS to CSS
[build-dependencies]
sass-rs = "0.2"
walkdir = "2"
@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
@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 / 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 / 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 / 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 / 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
#!/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
#