Skip to content

Instantly share code, notes, and snippets.

View matux's full-sized avatar
💭
To call each thing by its right name.

Matias Pequeno matux

💭
To call each thing by its right name.
View GitHub Profile
@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
Undefined symbols for architecture arm64:
"typeinfo for std::logic_error", referenced from:
nanoflann::CArray<nanoflann::KDTreeBaseClass<nanoflann::KDTreeSingleIndexDynamicAdaptor_<nanoflann::L2_Simple_Adaptor<float, PointCloud<float>, float>, PointCloud<float>, 3, unsigned long>, nanoflann::L2_Simple_Adaptor<float, PointCloud<float>, float>, PointCloud<float>, 3, unsigned long>::Interval, 3ul>::resize(unsigned long) in libFantasmoSDK.a(dynamicNanoflann-Wrapper.o)
nanoflann::CArray<nanoflann::KDTreeBaseClass<nanoflann::KDTreeSingleIndexAdaptor<nanoflann::L2_Simple_Adaptor<float, PointCloud<float>, float>, PointCloud<float>, 3, unsigned long>, nanoflann::L2_Simple_Adaptor<float, PointCloud<float>, float>, PointCloud<float>, 3, unsigned long>::Interval, 3ul>::resize(unsigned long) in libFantasmoSDK.a(nanoflann-Wrapper.o)
"std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
std::__1::vector<nanoflann::KDTreeSingleIndexDynamicAdaptor_<nanoflann::L2_Simple_Ad
@matux
matux / tablebear
Created April 6, 2018 06:29
How to Tables on Bear app. Copy/paste example _as is_ on a note. (https://www.reddit.com/r/bearapp/comments/8a2k04/how_to_craft_pseudo_tables_on_bear/)
# Playgrounds Markup Cheat Sheet
## Callouts
::Name Description PG QH::
[Note](https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/Note.html#//apple_ref/doc/uid/TP40016497-CH39-SW1) Adds a Note callout. ✓ ✓
[Example](https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/Example.html#//apple_ref/doc/uid/TP40016497-CH58-SW1) Adds an Example callout. ✓
[Experiment](https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/Experiment.html#//apple_ref/doc/uid/TP40016497-CH36-SW1) Adds an Experiment callout. ✓ ✓
[Important](https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/Important.html#//apple_ref/doc/uid/TP40016497-CH37-SW1) Adds an Important callout ✓ ✓
[Custom Callout](https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_markup_formatting_ref/CustomCallouts.html#//apple_re
@matux
matux / RequestDeferrer.swift
Created November 16, 2017 21:16
Network request deferring system that facilitates offline support while offering a simple interface.
import Foundation
import LambdaKit
private let kDefaultIntervalRate: TimeInterval = 5.0
/// An interface defining a value that can be requested as a URL.
public protocol Routable {
/// The URL String for the route
var urlString: String { get }
<?xml version="1.0" encoding="UTF-8" ?>
<GraphicsConfig>
<MinimumAspectRatio>1.0</MinimumAspectRatio>
<HDRNode>
<KeyValue>0.500000</KeyValue>
<WhiteLevel>0.000000</WhiteLevel>
<DisplayLumScale>164.000000</DisplayLumScale>
<HistogramSampleWidth>60.500000</HistogramSampleWidth>
<ExposureThreshold>1.000000</ExposureThreshold>
<Percentiles>0.010000,0.540000,0.999000</Percentiles>
NDefines = {
NGameplay = {
CORE_SECTOR_PLANET_CAP = 100, -- Too many planets in core sector will apply modifier inefficient_planet_management.
},
}
import UIKit
/**
Describes a class that's a *ViewCell such as UICollectionViewCell or UITableViewCell.
*/
public protocol ReusableViewCell: class {
init()
}
/**
import UIKit
import Aspects
// MARK: Infix Segue operators
infix operator » {}
func » <U: SegueDestination, T: UIViewController where T: Segueable, T.Destination == U>
(sourceViewController: T, destination: U)
{
protocol Protocolable {
func function()
}
extension Protocolable where Self: BaseClass {
func function() {
print("yay")
}
}
import UIKit
infix operator » {}
func » <U: BaseSegueIdentifier, T: UIViewController where T: Segueable, T.SegueIdentifier == U>
(viewController: T, destination: U)
{
viewController.performSegueWithIdentifier(destination.identifier, sender: viewController)
}