Skip to content

Instantly share code, notes, and snippets.

View maelp's full-sized avatar

Mael maelp

View GitHub Profile
@maelp
maelp / README.md
Last active August 29, 2015 14:00
Fast prototyping tricks - Display prototype on device
@maelp
maelp / README.md
Last active August 29, 2015 14:00
Fast prototyping tricks - Create reproducible elements
@maelp
maelp / README.md
Last active August 29, 2015 14:00
Fast prototyping tricks - Transition along invisible path
@maelp
maelp / README.md
Last active August 29, 2015 14:00
Fast prototyping tricks - Transitions on invisible paths II
@maelp
maelp / README.md
Last active August 29, 2015 14:00
Fast prototyping tricks - Glowing screen
@maelp
maelp / README.md
Last active August 29, 2015 14:00
Fast prototyping tricks - Sorting elements
//
// YapRTreeTest.swift
// YapDatabaseRTreeTest
//
// Created by Maël Primet on 06/19/15.
// Copyright (c) 2015 Snips. All rights reserved.
//
import Foundation
@maelp
maelp / SharedValue.swift
Last active August 29, 2015 14:23
How to lock around a value
// Inspired from <https://www.mikeash.com/pyblog/friday-qa-2015-02-06-locks-thread-safety-and-swift.html>
import UIKit
/*
NOTE:
I’m not sure spin locks are the most efficient way to do this if we have methods which can potentially hold the lock for a long time, or too many threads trying to acquire a lock
@maelp
maelp / README.md
Last active December 18, 2015 14:38
The 8pen Doodle
@maelp
maelp / README.md
Last active December 19, 2015 06:49
Creating a brush stroke effect - part 1

Creating a brush stroke effect - part 1

Please see http://8pen.com/blog/doodle for a more complete explanation of how we built the brush stroke

The construction of the brush stroke is done in four steps:

  • create regularly spaced vertices describing the brush stroke centerline
  • compute the normal vectors at each point
  • extrude the ribbon
  • scale the ribbon to create a bulge around the midpoint