This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl -w | |
use strict; | |
use Text::ParseWords qw(quotewords); | |
# Returns [DependencyName] | |
sub parseCartfile { | |
open(my $fh, '<', $_[0]) or die "Cannot open file $_[0]"; | |
my @entries = (); | |
while (my $line = <$fh>) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl -w | |
use strict; | |
use List::Util qw(any); | |
use File::Basename qw(basename); | |
sub main { | |
# We require 3 arguments | |
if ($#ARGV != 2) { | |
usage(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl -w | |
use Getopt::Long; | |
sub main { | |
my $format = undef; | |
GetOptions('format=s', \$format); | |
if ($#ARGV > 0) { | |
quit("Usage: $0 [-f <format>] [<directory>]"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright (c) 2014 James Lawton | |
#import <Foundation/Foundation.h> | |
/** | |
* A mutable array that keeps itself sorted, according to a comparator. | |
* This has similar guarantees to NSMutableArray. It is not thread safe. | |
* Don't mutate this while enumerating. | |
*/ | |
@interface JALSortedArray : NSObject <NSFastEnumeration, NSCopying> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fix for https://github.com/bryanjclark/ios-darken-image-with-cifilter | |
-(instancetype)darkened:(CGFloat)alpha andBlurredImage:(CGFloat)radius blendModeFilterName:(NSString *)blendModeFilterName { | |
CIImage *inputImage = [[CIImage alloc] initWithImage:self]; | |
CIContext *context = [CIContext contextWithOptions:nil]; | |
//First, create some darkness | |
CIFilter* blackGenerator = [CIFilter filterWithName:@"CIConstantColorGenerator"]; |