Skip to content

Instantly share code, notes, and snippets.

View shirakaba's full-sized avatar

Jamie Birch shirakaba

View GitHub Profile
kconner / macOS
Last active June 18, 2024 10:28
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

caiorss / CMakeLists.txt
Created November 27, 2020 14:05
QuickJS engine sample project - shows how to embedded in C++
cmake_minimum_required(VERSION 3.9)
#========== Global Configurations =============#
# Instructions for fresh install
$ sh <(curl -L --darwin-use-unencrypted-nix-store-volume --daemon
# reboot
$ source /nix/var/nix/profiles/default/etc/profile.d/
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc
$ echo 'source $HOME/.nix-profile/etc/profile.d/' | tee -a ~/.zshrc
$ nix-channel --add
$ nix-channel --add darwin
$ nix-channel --add home-manager
extension UIHostingController {
convenience public init(rootView: Content, ignoreSafeArea: Bool) {
self.init(rootView: rootView)
if ignoreSafeArea {
func disableSafeArea() {
steipete / FirebaseCoordinator.swift
Created April 13, 2020 13:38
If you're as confused as I am that there's an API for custom options, yet Google still requires a file named GoogleService-Info.plist in your app, here's some swizzling that fixes that for ya. All Swift :)
class FirebaseCoordinator {
static let shared = FirebaseCoordinator()
static let initialize: Void = {
/// We modify Google Firebase (and eventually Analytics) to load the mac-specific plist at runtime.
/// Google enforces that we have a file named "GoogleService-Info.plist" in the app resources.
/// This is unfortunate since we need two different files based on iOS and Mac version
/// One solution is a custom build step that copies in the correct file:
/// However, this is basically impossible since Catalyst doesn't set any custom build variables, so detection is extremely difficult.
/// We swizzle to modify the loading times.
EddyVerbruggen / grafana-corona-widget.html
Last active March 16, 2020 16:52
Grafana Corona widget
- Add a 'Text' widget with the content below (set 'mode' to 'html').
- Make sure to enable JS parsing for this widget by setting the 'disable_sanitize_html' property to 'true' in your grafana.ini.
- For more detailed info, check out fi.
<div style="font-size: 20px">🦠<span id="confirmed"/></div>
<div style="font-size: 16px">💀<span id="deaths" /><span id="deathrate" style="color: #555; padding-left: 8px"/></div>
import T from 'prop-types';
/* eslint-disable no-extra-boolean-cast */
const existsCheck = (value) =>
typeof value !== 'undefined' && value !== null;
export default function Ternary({


I attended WWDC this year, and overall it was a fantastic experience. I would, however, like to give some feedback on one particular aspect of the conference.

Before I begin, I understand that it would be easy to brush off my feedback as coming from just some grumpy English guy, but I genuinely believe this is important feedback. Please do read until the end.

I would like to ask that the cheering, whooping, clapping and hollering by conference staff is toned down.

I'm a person that would describe myself as "slightly introverted". I cannot begin to describe how deeply uncomfortable it was to walk into the registration room on Sunday to multiple employees cheering and clapping at me, trying to give me high fives. I understand the want to make people excited, but this needs to have its limits. During the conference, I got cheered and high-fived pretty much the entire week for things like:

export * from "./expo-nativescript-adapter.common";
export const NativeModulesProxy = {};
const provider =;
const moduleRegistry = provider.moduleRegistryForExperienceId(
const exportedModules = moduleRegistry.getAllExportedModules();
for (let i = 0; i < exportedModules.count; i++) {
chourobin /
Last active June 16, 2024 11:03
React Native Bridging Cheatsheet