Skip to content

Instantly share code, notes, and snippets.

View yageek's full-sized avatar
🥨

Yannick Heinrich yageek

🥨
View GitHub Profile
@FWEugene
FWEugene / SwiftConcurrency.md
Created January 10, 2019 17:37
All about concurrency

Threads

Foundation offers a Thread class, internally based on pthread, that can be used to create new threads and execute closures.

// Detaches a new thread and uses the specified selector as the thread entry point.
Thread.detachNewThreadSelector(selector: Selector>, toTarget: Any, with: Any)

// Subclass
class MyThread: Thread {
@khanlou
khanlou / SKSerialInputStream.h
Last active November 10, 2022 11:41
Partially adapted from AFMultipartBodyStream
//
// SKSerialInputStream.h
// inputstream
//
// Created by Soroush Khanlou on 11/4/18.
// Copyright © 2018 Soroush Khanlou. All rights reserved.
//
#import <Foundation/Foundation.h>
@harishgonnabattula
harishgonnabattula / WWDC.json
Created August 25, 2018 20:34
WWDC 2015-2018 Video urls and summary
[
{"url": "https://devstreaming-cdn.apple.com/videos/wwdc/2018/236mwbxbxjfsvns4jan/236/236_hd_avspeechsynthesizer_making_ios_talk.mp4?dl=1", "title": "AVSpeechSynthesizer: Making iOS Talk", "summary": "Speech can enhance the audio experience of your app, whether you are generating spoken feedback for accessibility, or providing critical information beyond simple alerts or notifications. AVSpeechSynthesizer produces synthesized speech from text and allows you to control and monitor the progress of ongoing speech. Learn the ins and outs of AVSpeechSynthesizer and how to add computer-generated speech output to your app."},
{"url": "https://devstreaming-cdn.apple.com/videos/wwdc/2018/405bjty1j94taqv8ii/405/405_hd_measuring_performance_using_logging.mp4?dl=1", "title": "Measuring Performance Using Logging", "summary": "Learn how to use signposts and logging to measure performance. Understand how the Points of Interest instrument can be used to examine logged data. Get an introduction into creating and using custo
@matux
matux / scntool.md
Last active April 11, 2023 13:49
SceneKit scntool command line options
$ xcrun scntool --verbose
| Current SceneKit version is 4.560000
| Running scntool (compiled on Jul  1 2018 01:01:55)

usage: scntool --convert file --format format [--output file]
000084a8:  7363 7269 7074 696f 6e00 2d2d 7461 7267 6574 2d70 6c61 7466  :scription.--target-platf
@rust-play
rust-play / playground.rs
Created May 28, 2018 13:51
Code shared from the Rust Playground
#![allow(warnings)] // remove when error_chain is fixed
extern crate futures;
extern crate reqwest;
extern crate tokio_core;
#[macro_use]
extern crate error_chain;
extern crate serde;
extern crate serde_json;
@ryantan
ryantan / resign-ipa.md
Last active May 12, 2025 12:15
How to resign an .ipa

How to Resign an iOS App

Let's say you receive an app (e.g. MyApp.ipa) from another developer, and you want to be able to install and run it on your devices (by using ideviceinstaller, for example).

Or your certificates and provision profiles have expired and you want to provide a new build to your clients without having to make a new build on the latest XCode or iOS SDK.

Prepare New Signing Assets

The first step is to attain a Provisioning Profile which includes all of the devices you wish to install and run on. Ensure that the profile contains a certificate that you have installed in your Keychain Access (e.g. iPhone Developer: Some Body (XXXXXXXXXX) ). Download the profile (MyProfile.mobileprovision) so you can replace the profile embedded in the app.

@TimvanScherpenzeel
TimvanScherpenzeel / building-COLLADA2GLTF-MacOS-High-Sierra.md
Last active July 17, 2022 19:50
Building instructions for COLLADA2GLTF for MacOS High Sierra Version 10.13.4
# Tested on MacOS High Sierra Version 10.13.4

# Clone Git repo
git clone [email protected]:KhronosGroup/COLLADA2GLTF.git

cd COLLADA2GLTF

# Apple LLVM version 9.1.0 (clang-902.0.39.1) doesn't include 
@335g
335g / main.rs
Created March 31, 2018 09:42
type erasure in rust
trait AnimalExt {
fn eat(&self, food: String);
}
struct Dog;
impl AnimalExt for Dog {
fn eat(&self, food: String) {
println!("dog: {:?}", food);
}
@nst
nst / kovach_pycairo.py
Last active February 27, 2023 07:10
Reproducing Benjamin Kovach's art with pycairo
#!/usr/bin/env python
# Author: Nicolas Seriot
# Date: 2018-03-17
# Description: Reproducing Benjamin Kovach's art with pycairo
# https://www.kovach.me/Generating_artwork_with_Haskell.html
# Output: http://seriot.ch/visualization/kovach_pycairo.png
# Gist: https://gist.github.com/nst/3dc5378399678be7eb297ef18580025e
import cairo
@andr1972
andr1972 / miniCas.cpp
Last active September 14, 2018 02:48
Algebraic substitution trees, expand variables to subtree with cloning
#include <memory>
#include <string>
#include <vector>
#include <assert.h>
using namespace std;
enum Type { tEmpty, tNum, tVar, tFrac, tProd, tSum };
enum Precedence { precStart, precSum, precFrac, precAtom };