Skip to content

Instantly share code, notes, and snippets.

View lemonmojo's full-sized avatar

Felix Deimel lemonmojo

View GitHub Profile
@hecht1962
hecht1962 / ipstocrash.pl
Last active March 12, 2024 06:26
Convert an IPS crash report (.ips) to the legacy crash report format (.crash)
#!/usr/bin/perl
##
## This script converts an IPS crash report (.ips) to the legacy crash report format.
##
## The .ips file (JSON) is read from STDIN and the legacy crash report is written to
## STDOUT.
##
use strict;
@awakecoding
awakecoding / RdpProps.txt
Last active June 5, 2023 13:23
RDP Property Sets
CoreProperties(234):
ServerName (String)
ServerNetBiosName (String)
ServerFqdn (String)
ServerAddressesToConnect (IUnknown)
UserSpecifiedServerName (String)
UserName (String)
Domain (String)
Password (SecureString)
AlternateShell (String)

This page is now depreacted!

Check out the repo instead. The Wisdom of Quinn Now with 100% more archived PDFs.

The Wisdom of Quinn

Informative DevForum posts from everyone's favorite DTS member.

(Arranged newest to oldest)

@lukaskubanek
lukaskubanek / NSView Drawing Issue on macOS Big Sur.md
Last active July 18, 2022 08:09
NSView Drawing Issue on macOS Big Sur

This is an excerpt from our internal documentation describing an issue with drawing in NSViews on macOS Big Sur.

1️⃣ Introduction

In macOS Big Sur (probably starting with β9), Apple changed the default contents format for backing layers of NSViews. Instead of an explicit CALayerContentsFormat.RGBA8Uint value, an „Automatic“ value is now used. Even though it also resolves into „RGBA8“ in our testing, it has some serious implications as it breaks assumptions our code relies on.

I first stumbled upon this issue in this tweet by Frank. It links to a thread on Apple Forums by Mark that contains valuable information as well as ideas for workarounds. The changed behavior was also confirmed by Marcin in this tweet.

2️⃣ Impact on Diagrams

@aaugustin
aaugustin / powermate.py
Last active January 25, 2022 14:59
Hook a Griffin PowerMate to a Raspberry Pi running HifiBerry!
#!/usr/bin/env python3.8
"""
To enable this service, copy this file to /opt, then:
# chmod +x /opt/powermate.py
# pip3.8 install websockets
# cat > /etc/systemd/system/powermate.service
[Unit]
Description=PowerMate
@bgromov
bgromov / readme.md
Last active September 30, 2023 15:35
Compiling Swift framework with mixed-in Objective-C code

Problem

You can't use bridging headers within a framework.

Solution 1 (umbrella header):

Xcode will automatically create umbrella header for you Cocoa Framework project. That will be the file named <FrameworkName>.h in the <FrameworkName> group/folder (where the rest of your sources are).

  1. To include the required Obj-C header you need to set it as Public: select it in the project explorer (left pane) and change the property Target Membership (left—Inspectors—pane) from Project to Public.
  2. Open umbrella header (<FrameworkName>.h) and import the required header as:
@HiImJulien
HiImJulien / Swift Meets CCxx.md
Last active March 30, 2024 19:00
This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.

Swift Meets C/C++

This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.


Analytics

In this example we're going to invoke a function called say_hello, which, as the name already suggests, prints "Hello, World!" to the terminal.

@Nirma
Nirma / FTPUpload.swift
Last active December 30, 2023 02:11
Upload a file via FTP on iOS or macOS
import Foundation
import CFNetwork
public class FTPUpload {
fileprivate let ftpBaseUrl: String
fileprivate let directoryPath: String
fileprivate let username: String
fileprivate let password: String
@victor-torres
victor-torres / uninstall_shell_integration.sh
Created March 1, 2016 12:51
Uninstalling shell integration from iTerm 2
#!/bin/bash
function die() {
echo "${1}"
exit 1
}
which printf > /dev/null 2>&1 || die "Shell integration requires the printf binary to be in your path."
which sed > /dev/null 2>&1 || die "Shell integration requires the sed binary to be in your path."
@evands
evands / combine_static_libraries.sh
Created January 14, 2015 20:40
Combine multiple .a static libraries, which may each have multiple architectures, into a single static library
#!/bin/sh
# Combined all static libaries in the current directory into a single static library
# It is hardcoded to use the i386, armv7, and armv7s architectures; this can easily be changed via the 'archs' variable at the top
# The script takes a single argument, which is the name of the final, combined library to be created.
#
# For example:
# => combine_static_libraries.sh combined-library
#
# Script by Evan Schoenberg, Regular Rate and Rhythm Software