Skip to content

Instantly share code, notes, and snippets.


Mikael Bartlett mikaelbartlett

View GitHub Profile
View TokenBucket.swift
import Foundation
import Vapor
final class TokenBucket {
public let capacity: Int
public var tokenCount: Int
let workQueue = DispatchQueue(label: "com.midjar.resourcetokenbucket")
public init(capacity: Int, initialTokenCount: Int = 0) {

Keybase proof

I hereby claim:

  • I am mikaelbartlett on github.
  • I am midjar ( on keybase.
  • I have a public key whose fingerprint is 8720 702A D898 283B 0056 4085 B22F F1BA EB0E E104

To claim this, I am signing this object:

mikaelbartlett /
Created Apr 4, 2012
Panacea for slow Xcode
for f in $(ls -p ~/Library/Application\ Support/iPhone\ Simulator/| grep '/') ; do
if [ "$f" != 'User/' ]; then
echo "$f"
rm -r ~/Library/Application\ Support/iPhone\ Simulator/$f
mkdir ~/Library/Application\ Support/iPhone\ Simulator/$f
rm -r ~/Library/Developer/Xcode/DerivedData
mikaelbartlett / UILabelStrikethrough.h
Created Jun 29, 2011
Simple class for IOS SDK UILabel with strikethrough
View UILabelStrikethrough.h
@interface UILabelStrikethrough : UILabel {
int xOffset;
int yOffset;
int widthOffset;
int stroke;
UIColor* strokeColor;
@property (nonatomic) int xOffset;
@property (nonatomic) int yOffset;
@property (nonatomic) int widthOffset;
You can’t perform that action at this time.