Skip to content

Instantly share code, notes, and snippets.

View unixzii's full-sized avatar
🤔
Thinking...

Cyandev unixzii

🤔
Thinking...
View GitHub Profile

ARMv8.3 Pointer Authentication in xnu

Introduction

This document describes xnu's use of the ARMv8.3-PAuth extension. Specifically, xnu uses ARMv8.3-PAuth to protect against Return-Oriented-Programming (ROP) and Jump-Oriented-Programming (JOP) attacks, which attempt to gain control flow over a victim program by overwriting return addresses or function pointers

@IsaacXen
IsaacXen / README.md
Last active May 2, 2024 09:57
(Almost) Every WWDC videos download links for aria2c.
@bazad
bazad / vmmap.c
Last active January 4, 2024 16:32
A simple vmmap implementation for macOS.
// Brandon Azad (@_bazad)
#include <assert.h>
#include <errno.h>
#include <mach/mach.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@tclementdev
tclementdev / libdispatch-efficiency-tips.md
Last active April 26, 2024 10:15
Making efficient use of the libdispatch (GCD)

libdispatch efficiency tips

The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).

My take-aways are:

  • You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.

  • Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse

@homebysix
homebysix / osx-software-update-urls.txt
Last active September 29, 2023 20:34 — forked from geoff-nixon/osx-software-update-urls.txt
URLs of the index files used by the software update client on OS X
10.3 (Panther):
https://swscan.apple.com/scanningpoints/scanningpointX.xml
10.4 (Tiger):
https://swscan.apple.com/content/catalogs/index.sucatalog
https://swscan.apple.com/content/catalogs/index-1.sucatalog
10.5 (Leopard):
https://swscan.apple.com/content/catalogs/others/index-leopard.merged-1.sucatalog
@bazhenovc
bazhenovc / v8_wrap_class.cpp
Created September 28, 2015 15:25 — forked from mythagel/v8_wrap_class.cpp
Complete example of binding a C++ class with Google V8.
/*
* v8_wrap_class.cpp
*
* Created on: 14/01/2013
* Author: nicholas
* License: public domain
*/
/* CMakeLists.txt
project(v8_wrap_class)
@chrisbanes
chrisbanes / SystemUiHelper.java
Last active March 2, 2024 18:57
SystemUiHelper
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@koenbok
koenbok / qc-framer.js
Created May 14, 2014 15:04
QC Spring Value Converter
var QcValueConverter = {
tensionFromQcValue: function(qcValue) {
return (qcValue - 30.0) * 3.62 + 194.0;
},
qcValueFromTension: function(tension) {
return (tension - 194.0) / 3.62 + 30.0;
},
frictionFromQcValue: function(qcValue) {
#include <unistd.h>
#include <node.h>
#include <string.h>
#include <v8.h>
using namespace v8;
unsigned long long count = 0;
// native blocking/compute intensive function