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 "PMViewController.h" | |
#import <QuartzCore/QuartzCore.h> | |
@interface PMViewController () | |
{ | |
CALayer *boxLayer; | |
} | |
@end | |
@implementation PMViewController |
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
#!/usr/bin/env python | |
import mechanize | |
from bs4 import BeautifulSoup | |
import smtplib | |
from email.mime.text import MIMEText | |
URL = 'https://www.lendingclub.com/account/gotoLogin.action' | |
LENDING_CLUB_EMAIL = '' | |
LENDING_CLUB_PASSWORD = '' | |
GMAIL_ADDRESS = '' |
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
// | |
// NSString+CamelCase.m | |
// CamelCase | |
// | |
// Created by Peter Foti on 4/9/15. | |
// Copyright (c) 2015 Peter Foti. All rights reserved. | |
// | |
#import "NSString+CamelCase.h" |
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 | |
set -e | |
for d in */; do | |
count=$(find $d -type f | wc -l) | |
if [[ $count -eq 1 ]]; then | |
result="$d $count" | |
echo $result >> results.txt | |
fi |
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
// NSObject+PropertyDictionary.m | |
// | |
// Created by Peter Foti on 4/22/15. | |
#import "NSObject+PropertyDictionary.h" | |
#import <objc/runtime.h> | |
@implementation NSObject (PropertyDictionary) | |
- (NSDictionary *)toDictionary |
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 | |
set -e | |
read -e -p "Enter path to Xcode project: " FILES | |
eval FILES=$FILES | |
find "$FILES" -type f \( -name "*.h" -or -name "*.m" \) | while read -r f; | |
do |
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 | |
// Localized string struct that has single static method which accepts a `Localizeable` value. | |
struct LocalizedString { | |
// Usage: LocalizedString.localizedStringForValue(NavBarTitle.Home) | |
static func localizedStringForValue<T: Localizeable>(localizeableValue: T) -> String { | |
return NSLocalizedString(localizeableValue.localizedString, comment: localizeableValue.localizedStringComment) |
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 | |
set -e | |
xcodeproj=`find . -maxdepth 1 -name "*.xcodeproj"` | |
proj_name=`echo $xcodeproj | sed 's/.\///g' | sed 's/.xcodeproj//g'` | |
xcworkspace=`find . -maxdepth 1 -name "$proj_name.xcworkspace"` | |
if [[ ! -z $xcworkspace && -e $xcworkspace ]]; then | |
open $xcworkspace |
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
// | |
// PJNotificationCenter.m | |
// NotificationSample | |
// | |
// Created by Peter Foti on 6/21/16. | |
// Copyright © 2016 Peter Foti. All rights reserved. | |
// | |
#import "PJNotificationCenter.h" | |
#import "PJNotificationKey.h" |
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 | |
protocol PJPageControlUsable { | |
var indicatorType: PJPageControl.Indicator { get } | |
} | |
protocol PJPageControlDelegate: class { | |
OlderNewer