Skip to content

Instantly share code, notes, and snippets.

View ntnmrndn's full-sized avatar

Marandon Antoine ntnmrndn

View GitHub Profile
// MARK: - Caches
public protocol DirectoryCachable {
var directoryName: String { get }
}
extension Caches {
// MARK: - DataCacheStack
/// A synchronous, thread safe, directory cache.
class CamembertProgressView: UIView {
private let camembertFillingLayer = CAShapeLayer()
private let lineWidth: CGFloat = 5
private let color = UIColor.white.cgColor
var progress: CGFloat = 0 {
didSet {
camembertFillingLayer.strokeEnd = progress
}
}
override init(frame: CGRect) {
private var metaPool = [String:[Any]]()
protocol Poolable: Any {
init()
}
class Pool<T: Poolable> {
private static var typeKey: String {
return "\(T.self)"
}
@ntnmrndn
ntnmrndn / LIFOOperationQueue.swift
Last active July 30, 2018 06:43
Swift LIFO Queue
//
// LIFOOperationQueue.swift
//
//
// Created by Antoine Marandon on 27/07/2018.
//
import Foundation
/// Last in First Out Operation queue.
/// Last in First Out Operation queue.
class LIFOOperationQueue {
enum Priority {
case high
case low
}
private let queue: DispatchQueue
private var highPriorityOperations = [Operation]()
private var lowPriorityOperations = [Operation]()
@ntnmrndn
ntnmrndn / Paris.md
Last active July 24, 2018 09:08
A Readme for my friends visiting Paris.

Un petit guide Parisien

Generic tips

Paris is small. Most point of interest are within walking/biking distance of each other. Don't hesitate to rent a bike in one of the numerous spots all around the city. Here how it works:

  • Pay for one day or more
  • Take a bike anywhere, put it back anywhere. First 30min of each ride is free, but you can always put it back and take it again :p
# coding: utf-8
require 'active_support/core_ext/array'
require 'active_support/core_ext/string/inflections'
module Pod
# Validates a Specification.
#
# Extends the Linter from the Core to add additional which require the
# LocalPod and the Installer.
#

Keybase proof

I hereby claim:

  • I am ntnmrndn on github.
  • I am ntnmrndn (https://keybase.io/ntnmrndn) on keybase.
  • I have a public key whose fingerprint is 6CF6 F1DD 8DA2 6027 DA4B A306 AC72 81E5 5AD8 2AE3

To claim this, I am signing this object:

This file has been truncated, but you can view the full file.
Sampling process 45540 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Safari (pid 45540) every 1 millisecond
Process: Safari [45540]
Path: /Applications/Safari.app/Contents/MacOS/Safari
Load Address: 0x10d6fb000
Identifier: com.apple.Safari
Version: 8.0.3 (10600.3.18)
Build Info: WebBrowser-7600003018000000~1
Code Type: X86-64