This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
An event loop policy that integrates Windows message loop with IOCP-based async processing. | |
Usage: | |
asyncio.set_event_loop_policy(winmsgasyncio.MsgProactorEventLoopPolicy()) | |
To integerate with tkinter, use tk_sync_mainloop(root) or await tk_async_mainloop(root). | |
""" | |
# SPDX-License-Identifier: MIT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
extension UIHostingController { | |
convenience public init(rootView: Content, ignoreSafeArea: Bool) { | |
self.init(rootView: rootView) | |
if ignoreSafeArea { | |
disableSafeArea() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Inside WSL... | |
# Install virt-manager | |
sudo apt install -y virt-manager | |
# Add youself to kvm and libvirt group | |
sudo usermod --append --groups kvm,libvirt "${USER}" | |
# Fix-up permission to avoid "Could not access KVM kernel module: Permission denied" error | |
sudo chown root:kvm /dev/kvm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
How to use the content of this gist: | |
- Create a new iOS app using the "App" template, | |
set the product name to "Demo", use "SwiftUI" for interface and enable Core Data. | |
- go to the apps target (=click the Project "Demo" and select "Demo" as under "Targets") | |
- select the "Info" tab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |