Skip to content

Instantly share code, notes, and snippets.

@osy
osy / README.md
Last active February 11, 2026 16:30 — forked from akihikodaki/README.en.md
QEMU on Apple Silicon with Vulkan support

QEMU on Apple Silicon with Vulkan support

The following is taken from https://gist.github.com/akihikodaki/87df4149e7ca87f18dc56807ec5a1bc5 with modifications to introduce Vulkan support. Since we need custom patches to QEMU, virglrenderer, MoltenVK, and libepoxy, the provided script will pull the right refs and build everything with the right params. Feel free to inspect the script to find the source for all the modifications. We are actively working to upstream everything so please do not build anything long-term with these patches.

Testing

Prerequisites

  • Xcode (relatively recent version)
  • Vulkan SDK for macOS (Make sure to select "System Global Installation" during Select Components.)
@Nelyus
Nelyus / copyCarthageFrameworks.sh
Last active September 21, 2015 14:05
Copy frameworks build by carthage to the target build dir, so Xcode can find them more easily (for exemple in playgrounds)
#!/usr/bin/env sh
# Carthage build dirs per platform
CARTHAGE_IOS_BUILD_DIR="Carthage/Build/iOS"
CARTHAGE_MAC_BUILD_DIR="Carthage/Build/Mac"
if [ "$PLATFORM_NAME" = "iphoneos" -o "$PLATFORM_NAME" = "iphonesimulator" ]; then
CARTHAGE_BUILD_DIR="$CARTHAGE_IOS_BUILD_DIR"
elif [ "$PLATFORM_NAME" = "macosx" ]; then
CARTHAGE_BUILD_DIR="$CARTHAGE_MAC_BUILD_DIR"
@algal
algal / diffs.swift
Last active July 30, 2018 09:15
diff calculator
// swift 1.2
/**
:param: old array of items
:param: new array of items
:return: a tuple where with the following components:
- `newIndexesAdded` indexes in new, for elements that did not exist in old
- `oldIndexesDeleted` indexes in old, for elements not in new
@drance
drance / UIViewController+BHSContainment.m
Last active September 2, 2021 00:26
Tired of the UIViewController containment three-step. Adds a convenience param if the destination superview is not actually the parent VC's main view.
@implementation UIViewController (BHSContainment)
- (void)bhs_addChildViewController:(UIViewController *)child {
[self bhs_addChildViewController:child superview:self.view];
}
// Note this potentially forces view loads on both parent and child
// Not a problem if used in -viewDidLoad or later
// Use superview parameter with care. If it's not within the parent VC's hierarchy, you deserve to lose
@datagrok
datagrok / git-serve.md
Last active April 21, 2023 07:33
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.
@jboesch
jboesch / gist:1299783
Created October 19, 2011 21:44
Drag/drop for fullCalendar on iPad
/********************************
* UPDATE: I have crated a plugin to do this: https://github.com/jboesch/jQuery-fullCalendar-iPad-drag-drop/
*********************************/
/*These are the brief steps that it takes to get fullCalendar (http://arshaw.com/fullcalendar/) up and running with drag/drop support on the iPad. This assumes you already have fullCalendar setup.*/
//1. Include a copy of jQuery touch punch in your project, you can find it here: https://github.com/furf/jquery-ui-touch-punch
//2. Go into jquery-touch-punch.js and right after this line (around line 57 - mouseProto._mouseDown = function (event) {) add this: this._mouseDownEvent = event;
//3. Add this function somewhere in your global.js file or wherever you want: