Skip to content

Instantly share code, notes, and snippets.

View mikaelbartlett's full-sized avatar

Mikael Bartlett mikaelbartlett

  • Wagestream
  • Alicante, Spain
View GitHub Profile

Keybase proof

I hereby claim:

  • I am mikaelbartlett on github.
  • I am midjar (https://keybase.io/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
mikaelbartlett / cleanup.sh
Created April 4, 2012 05:31
Panacea for slow Xcode
#!/bin/sh
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
fi
done
rm -r ~/Library/Developer/Xcode/DerivedData
@mikaelbartlett
mikaelbartlett / UILabelStrikethrough.h
Created June 29, 2011 19:33
Simple class for IOS SDK UILabel with strikethrough
@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;
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) {