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
#!/bin/bash | |
#Setup the environnement | |
mkdir fall2017 | |
cd fall2017 | |
mkdir tmp_download | |
cd tmp_download | |
#Extract IDs | |
echo "Downloading the index" |
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
#!/bin/bash | |
#Setup the environnement | |
mkdir wwdc2017 | |
cd wwdc2017 | |
mkdir tmp_download | |
cd tmp_download | |
#Extract IDs | |
echo "Downloading the index" |
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
import Foundation | |
import CoreData | |
@objc(<$managedObjectClassName$>) | |
public class <$managedObjectClassName$>: <$customSuperentity$> { | |
// MARK: - Life cycle methods | |
public override init(entity: NSEntityDescription, insertInto context: NSManagedObjectContext?) { | |
super.init(entity: entity, insertInto: context) |
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
double ToRadians(double degrees) { return degrees * M_PI / 180; } | |
- (NSNumber *)geoDistanceFromLat:(CLLocationDegrees)lat1 fromLon:(CLLocationDegrees)lng1 toLat:(CLLocationDegrees)lat2 toLon:(CLLocationDegrees)lng2 { | |
CLLocationDistance EarthRadiusInMeters = 6367000.0; | |
CLLocationDistance distance = EarthRadiusInMeters * 2 * | |
asin(fmin(1, sqrt((pow(sin((ToRadians(lat2) - ToRadians(lat1)) / 2.0),2.0) | |
+ | |
cos(ToRadians(lat1)) * cos(ToRadians(lat2)) |
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
# Get the version number from the tag in git and the number of commits as the build number | |
# | |
appVersion=$(git describe --long | cut -f 1 -d "-") | |
appBuild=$(git describe --long | cut -f 2 -d "-") | |
#gitHash=$(git describe --long | cut -f 3 -d "-") | |
echo "From GIT Version = $appVersion Build = $appBuild" | |
# | |
# Set the version info in plist file | |
# |
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
curl https://developer.apple.com/videos/wwdc/2014/ | grep -iIoh 'http.*._hd_.*dl=1">HD' | sed -e 's/\?dl=1">HD//g' | xargs -n1 wget -N |
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
- (void)preferredContentSizeChanged:(NSNotification *)aNotification | |
{ | |
UITextView *textView = <the text view holding your attributed text> | |
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithAttributedString:textView.attributedText]; | |
NSRange range = NSMakeRange(0, attributedString.length - 1); | |
// Walk the string's attributes | |
[attributedString enumerateAttributesInRange:range options:NSAttributedStringEnumerationReverse usingBlock: | |
^(NSDictionary *attributes, NSRange range, BOOL *stop) { |
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
UIFontDescriptor *userFont = [UIFontDescriptor preferredFontDescriptorWithTextStyle:UIFontTextStyleBody]; | |
float userFontSize = [userFont pointSize]; | |
someLabelOrText.font = [UIFont fontWithName:@"CustomFont" size:userFontSize]; |
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
body, dt, dd { | |
font-family: "Avenir Next", sans-serif !important; | |
line-height: 1.5 !important; | |
} | |
body { | |
font-size: 14px !important; | |
font-weight: 400 !important; | |
} |