This file contains 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 | |
/// FuzzySearchCharacters is used to normalise strings | |
struct FuzzySearchCharacter { | |
let content: String | |
// normalised content is referring to a string that is case- and accent-insensitive | |
let normalisedContent: String | |
} | |
/// FuzzySearchString is just made up by multiple characters, similar to a string, but also with normalised characters |
This file contains 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
# Developer ID Installer cert name | |
sign_cert="Developer ID Installer: Name (ABCD123456)" | |
# profile name used with `notarytool --store-credentials` | |
credential_profile="notary-example.com" | |
# data from build settings | |
pkg_name="$PRODUCT_NAME" | |
identifier="$PRODUCT_BUNDLE_IDENTIFIER" | |
version="$MARKETING_VERSION" |
This file contains 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
from PyPDF2 import PdfFileReader, PdfFileWriter | |
from PyPDF2.pdf import PageObject | |
reader = PdfFileReader(open("invoice.pdf",'rb')) | |
invoice_page = reader.getPage(0) | |
sup_reader = PdfFileReader(open("supplement.pdf",'rb')) | |
sup_page = sup_reader.getPage(1) # We pick the second page here | |
translated_page = PageObject.createBlankPage(None, sup_page.mediaBox.getWidth(), sup_page.mediaBox.getHeight()) |
This file contains 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 <Contacts/Contacts.h> | |
@implementation ContactsScan | |
- (void) contactScan | |
{ | |
if ([CNContactStore class]) { | |
//ios9 or later | |
CNEntityType entityType = CNEntityTypeContacts; | |
if( [CNContactStore authorizationStatusForEntityType:entityType] == CNAuthorizationStatusNotDetermined) |
This file contains 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 | |
############################################################################### | |
## ## | |
## Build and package OpenSSL static libraries for OSX/iOS ## | |
## ## | |
## This script is in the public domain. ## | |
## Creator : Laurent Etiemble ## | |
## ## | |
############################################################################### |
This file contains 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
/// Observes a run loop to detect any stalling or blocking that occurs. | |
/// | |
/// This class is thread-safe. | |
@interface GHRunLoopWatchdog : NSObject | |
/// Initializes the receiver to watch the specified run loop, using a default | |
/// stalling threshold. | |
- (id)initWithRunLoop:(CFRunLoopRef)runLoop; | |
/// Initializes the receiver to detect when the specified run loop blocks for |
This file contains 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
// | |
// KeychainHelper.h | |
#import <Foundation/Foundation.h> | |
@interface KeychainHelper : NSObject | |
@property (strong, nonatomic) NSMutableDictionary * keychainItem; |
This file contains 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 | |
############################################################################### | |
## ## | |
## Build and package OpenSSL static libraries for OSX/iOS ## | |
## ## | |
## This script is in the public domain. ## | |
## Creator : Laurent Etiemble ## | |
## ## | |
############################################################################### |
This file contains 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
# coding=UTF-8 | |
from __future__ import division | |
import re | |
# This is a naive text summarization algorithm | |
# Created by Shlomi Babluki | |
# April, 2013 | |
class SummaryTool(object): |
NewerOlder