Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!
NOTE: that this is current, 10/1/2021 state.
- Install Xcode from App Store or install Command Line Tools on your Mac
// We'll store a UIViewController as an associated object and don't want to store a strong reference to it. | |
private final class WeakBoxedValue<T: AnyObject>: NSObject { | |
private(set) weak var value: T? | |
init(_ value: T?) { | |
self.value = value | |
} | |
} | |
// Use associated objects to a UIViewController that should determine the status bar appearance. |
Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!
NOTE: that this is current, 10/1/2021 state.
#! /bin/bash | |
# current the latest stable android branch (from Jan 2020) | |
githash=daabea6ba6c09f72e956e826b132f1d1b77acb9b | |
# if want to run this from somewhere other then /data adjust below | |
basedir=/data | |
# exit when any command fails | |
set -e |
// -- Usage | |
struct Content: View { | |
@State var open = false | |
@State var popoverSize = CGSize(width: 300, height: 300) | |
var body: some View { | |
WithPopover( | |
showPopover: $open, | |
popoverSize: popoverSize, |
pragma solidity ^0.4.23; | |
/// @title The Panmunjom Declaration for Peace, Prosperity and Unification of the Korean Peninsula | |
/// @author atomrigs | |
contract PanmunjomDeclaration { | |
string constant public content = "\xED\x95\x9C\xEB\xB0\x98\xEB\x8F\x84\xEC\x9D\x98\x20\xED\x8F\x89\xED\x99\x94\xEC\x99\x80\x20\xEB\xB2\x88\xEC\x98\x81\x2C\x20\xED\x86\xB5\xEC\x9D\xBC\xEC\x9D\x84\x20\xEC\x9C\x84\xED\x95\x9C\x20\xED\x8C\x90\xEB\xAC\xB8\xEC\xA0\x90\x20\xEC\x84\xA0\xEC\x96\xB8\x0A\x0A\xEB\x8C\x80\xED\x95\x9C\xEB\xAF\xBC\xEA\xB5\xAD\x20\xEB\xAC\xB8\xEC\x9E\xAC\xEC\x9D\xB8\x20\xEB\x8C\x80\xED\x86\xB5\xEB\xA0\xB9\xEA\xB3\xBC\x20\xEC\xA1\xB0\xEC\x84\xA0\xEB\xAF\xBC\xEC\xA3\xBC\xEC\xA3\xBC\xEC\x9D\x98\xEC\x9D\xB8\xEB\xAF\xBC\xEA\xB3\xB5\xED\x99\x94\xEA\xB5\xAD\x20\xEA\xB9\x80\xEC\xA0\x95\xEC\x9D\x80\x20\xEA\xB5\xAD\xEB\xAC\xB4\xEC\x9C\x84\xEC\x9B\x90\xEC\x9E\xA5\xEC\x9D\x80\x20\xED\x8F\x89\xED\x99\x94\xEC\x99\x80\x20\xEB\xB2\x88\xEC\x98\x81\x2C\x20\xED\x86\xB5\xEC\x9D\xBC\xEC\x9D\x84\x20\xEC\x97\xBC\xEC\x9B\x90\xED\x95\x98\x |
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
#!/bin/bash | |
# Global build settings | |
export SDKPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk | |
export MIN_MACOS_VERSION=10.10 | |
export HOST=x86_64-apple-darwin | |
export LDFLAGS_NATIVE="-isysroot $SDKPATH" | |
export TASN1_CFLAGS="-Ilibtasn1/include" | |
export TASN1_LIBS="-Llibtasn1 -ltasn1" | |
export ARCH="x86_64" |
<?php | |
// Constants | |
$KEY_ID = 'YOUR_KEY_ID'; | |
$CONTAINER = 'YOUR_CONTAINER'; | |
$PRIVATE_PEM_LOCATION = 'eckey.pem'; // Store this file outside the public folder! | |
// Config | |
$url = 'https://api.apple-cloudkit.com/database/1/' . $CONTAINER . '/development/public/records/query'; | |
$body = '{"query":{"recordType":"Articles"}}'; |
Successful mitmproxy-3.7 setup tested on OS X 10.13.6 and iPhone X running 12.1.4
Enable IP forwarding and disable ICMP redirects to keep the iPad sending traffic to the proxy
sudo sysctl -w net.inet.ip.forwarding=1
sudo sysctl -w net.inet.ip.redirect=0
net.inet.ip.forwarding
Enable IP forwarding between interfaces
cmake_minimum_required(VERSION 2.8.4) | |
project(so29595222) | |
find_package(PythonLibs REQUIRED) | |
include_directories(${PYTHON_INCLUDE_DIRS}) | |
ADD_DEFINITIONS( -std=c++11 ) | |
set(SOURCE_FILES python_threading_example_so29595222.cpp) |