Skip to content

Instantly share code, notes, and snippets.

View michaelforrest's full-sized avatar

Michael Forrest michaelforrest

View GitHub Profile
@ngan
ngan / sphinx.rb
Last active October 7, 2015 15:28
Sphinx 0.9.9 Formula
class Sphinx < Formula
homepage 'http://www.sphinxsearch.com'
url 'http://sphinxsearch.com/files/archive/sphinx-0.9.9.tar.gz'
sha1 '8c739b96d756a50972c27c7004488b55d7458015'
version '0.9.9'
head 'http://sphinxsearch.googlecode.com/svn/trunk/'
devel do
url 'http://sphinxsearch.com/files/sphinx-2.1.1-beta.tar.gz'
@ryochin
ryochin / gist:1156124
Created August 19, 2011 05:35
Moonphase for Objective-C
@interface MoonPhase : NSObject {
@private
NSDate *now;
}
- (float) phase;
@end
// ---------------------------------------
@akisute
akisute / gist:1141953
Created August 12, 2011 12:41
Create an animated gif file from images in iOS
#import <UIKit/UIKit.h>
#import <ImageIO/ImageIO.h>
#import <MobileCoreServices/MobileCoreServices.h>
- (void)exportAnimatedGif
{
UIImage *shacho = [UIImage imageNamed:@"shacho.png"];
UIImage *bucho = [UIImage imageNamed:@"bucho.jpeg"];
NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"animated.gif"];