Skip to content

Instantly share code, notes, and snippets.

@foundry
foundry / UIImage+Rotate.h
Last active March 11, 2016 23:38
UIKit rotation category on UIImage
//
// UIImage+Rotate.h
//
// Created by Foundry on 21/09/2013.
//
#import <UIKit/UIKit.h>
@interface UIImage (Rotate)
@foundry
foundry / .gitignore
Last active December 10, 2015 04:48 — forked from adamgit/.gitignore
#########################
#update 19 September 2015
# Xcode 7 introduces a new file .xcscmblueprint
# following this advice
# http://stackoverflow.com/questions/31584297/xcode-7-ignore-xcscmblueprint-in-repository
*.xcscmblueprint
#########################
#########################
@foundry
foundry / random_weights.pl
Created December 1, 2012 13:52
various weighted random number algorithms in perl
#!/usr/bin/perl
=comment
various attempts at getting weighted random number distributions
first,second are dice-roll convergences
(if you roll multiple die multiple times the results will converge on a normal curve)
http://en.wikipedia.org/wiki/Central_limit_theorem
boxmuller gives a normal/gaussian distribution (classic bell curve)
rayleigh and weibull have more variables to play with