Skip to content

Instantly share code, notes, and snippets.

View thomas-brandstaetter's full-sized avatar

Thomas Brandstätter thomas-brandstaetter

  • Styria - Deutschlandsberg
View GitHub Profile
sudo defaults write /Library/Preferences/com.apple.AOSKit ClientValidationEnabled -bool NO
sudo ditto /usr/libexec/taskgated_debug /usr/libexec/taskgated
sudo defaults write /Library/Preferences/com.apple.security.coderequirements Entitlements -string always
sudo defaults write /Library/Preferences/com.apple.security.coderequirements AllowUnsafeDynamicLinking -bool YES
sudo killall taskgated syncdefaultsd
@thomas-brandstaetter
thomas-brandstaetter / RadioButton.swift
Created November 9, 2023 02:38 — forked from ArtiomKha/RadioButton.swift
Gist for Medium article about radio button
import UIKit
class RadioButton: UIControl {
var unselectedBackgroundColor: UIColor = .white {
didSet {
contentView.backgroundColor = unselectedBackgroundColor
}
}

Hello, I'm working on getting CMake setup to build a macOS bundle on macOS. I've been running into some roadblocks, ie. getting the bundle built, ie. Inkscape.app, however I've been running into issues with the assembling the bundle using the make install command. Inkscape builds and configures fine no issuses or errors present using CMake, I'm running into issues with constructing a Inkscape.app bundle.

Objective

To successfully generate a Inkscape.app bundle for macOS that can run Inkscape on macOS from launching Inkscape.app

Issue

The make install process does not create a runable / usable Inkscape.app bundle for macOS.

@thomas-brandstaetter
thomas-brandstaetter / audit_mixin.py
Created June 18, 2023 07:42 — forked from mjhea0/audit_mixin.py
Useful SQLAlchemy Mixins
from datetime import datetime
from sqlalchemy import Column, Integer, DateTime, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declared_attr
from flask_security import current_user
class AuditMixin(object):
created_at = Column(DateTime, default=datetime.now)
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)
@thomas-brandstaetter
thomas-brandstaetter / ARMDebianUbuntu.md
Created January 21, 2020 08:27 — forked from Liryna/ARMDebianUbuntu.md
Emulating ARM on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

@thomas-brandstaetter
thomas-brandstaetter / sql.cpp
Created December 23, 2018 11:00 — forked from allyusd/sql.cpp
Qt PostgreSQL Example
QSqlDatabase db = QSqlDatabase::addDatabase("QPSQL");
db.setHostName("127.0.0.1");
db.setDatabaseName("FirstDB");
db.setUserName("demo");
db.setPassword("password");
bool ok = db.open();
if (ok)
{
QSqlQuery query("SELECT \"SID\", \"Account\", \"CreateDate\", \"LoginTimes\" FROM \"Account\"");
@thomas-brandstaetter
thomas-brandstaetter / _verify-repair-permissions-disk.md
Created September 13, 2018 18:01 — forked from bzerangue/_verify-repair-permissions-disk.md
Mac OS X Utilities via Terminal: (Verify and Repair: Disk Permissions AND Disk / Software Update / TimeMachine)

Verify and Repair Disk Permissions via Terminal (Mac OS X)

Verify Permissions

diskutil verifyPermissions /

Repair Permissions

diskutil repairPermissions /

@thomas-brandstaetter
thomas-brandstaetter / zshrc.md
Last active June 16, 2018 22:45
zshrc cheat sheet

To try it out if you have just cloned it (to your home directory):

source ~/.oh-my-zsh/templates/zshrc.zsh-template

Commands

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@thomas-brandstaetter
thomas-brandstaetter / list-picker.cpp
Created May 2, 2018 05:44 — forked from xaizek/list-picker.cpp
ncurses++ usage example
// Copyright (C) 2016 xaizek <xaizek@openmailbox.org>
//
// This application is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This application 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