Skip to content

Instantly share code, notes, and snippets.

View kimwalisch's full-sized avatar

Kim Walisch kimwalisch

View GitHub Profile
env:
OSX v10.4.11
Python 2.5
mercurial v1.2.1
git v1.6.3.1
repos:
using python repository as of 2009-06-18
@kimwalisch
kimwalisch / contents_scale_test.py
Created June 11, 2021 09:10 — forked from akiross/contents_scale_test.py
Zooming QtQuick Painted item using contents size
#!/usr/bin/env python3
from PyQt5.QtGui import QPainter
from PyQt5.QtCore import *
from PyQt5.QtQuick import *
from PyQt5.QtWidgets import *
class Item(QQuickPaintedItem):
def __init__(self, useBoundRect, parent=None):
super().__init__(parent)
@kimwalisch
kimwalisch / gist:e1a821b3a7f8b66b4be02326f45941da
Created December 13, 2018 13:53 — forked from TooTallNate/gist:906665
Output of "sysctl -a hw" on my iPhone 4.
hw.ncpu: 1
hw.byteorder: 1234
hw.memsize: 527433728
hw.activecpu: 1
hw.physicalcpu: 1
hw.physicalcpu_max: 1
hw.logicalcpu: 1
hw.logicalcpu_max: 1
hw.cputype: 12
hw.cpusubtype: 9
@kimwalisch
kimwalisch / int128.h
Created November 22, 2017 12:25 — forked from Bananattack/int128.h
A signed 128-bit integer type. Internally stores its data in Two's Complement within two unsigned 64-bit integer parts. Still needs more testing, but basic implementation is fairly complete.
#ifndef WIZ_UTILITY_INT128_H
#define WIZ_UTILITY_INT128_H
#include <cassert>
#include <cstdint>
#include <cstddef>
#include <cstring>
#include <cstdlib>
#include <utility>
#include <string>