Skip to content

Instantly share code, notes, and snippets.

View paulthorsteinson's full-sized avatar

Paul Thorsteinson paulthorsteinson

View GitHub Profile

Video Quality Experimentation

TLDR: Currently video is being captured with medium quality. We can increase it to high quality with a very noticeable difference at a cost of about 220mb per package.

Current Video Capture

  • Captures the raw footage with the default quality type of medium as a .mov file (you can’t change the capture format, only convert)
  • Converts the .mov file into a .mp4 file so that it can play on non Apple platforms. “Should optimize for network use” is turned on (supposedly enables fast start for quick time movies…)
  • Flipping the “should optimize” setting appeared to have no impact in size or quality so I would propose it be left on
  • The current process appears to produce videos of 3MB in size (for 30 second video)

Keybase proof

I hereby claim:

To claim this, I am signing this object:

-UI is worse for sure
-hard to see warnings/errors
-debug view no where as nice as xcode, have to configure
- I do like that it has the alt enter - like implement a method you just defined in header
- I do like its remove unused imports
- i like i can do ctrl space to use class not imported and when i pick it does the req'd import
- i like that it shows lines to line up ifs, blocks etc
- tells me things like "variable always nil" when i forget to use it
- I would love to have the UI of xcode with the functionality of appcode
-i dont like how it uses the function keys so much, which on a mac requires fn key. Or worse backspace key which is not on mac keyboard
- (CGSize)compatibleSizeWithText:(NSString *)text font:(UIFont *)font constrainedToSize:(CGSize)size {
CGSize resultSize;
if ([text respondsToSelector:@selector(boundingRectWithSize:options:attributes:context:)]) {
NSMethodSignature *signature = [[NSString class] instanceMethodSignatureForSelector:@selector(boundingRectWithSize:options:attributes:context:)];
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
[invocation setTarget:text];
[invocation setSelector:@selector(boundingRectWithSize:options:attributes:context:)];
NSDictionary *attributes = @{ NSFontAttributeName:font };
NSStringDrawingOptions options = NSStringDrawingUsesLineFragmentOrigin| NSStringDrawingUsesFontLeading;
+(void) broadcastTweetsForHashTag:(NSString *)hashTag{
ACAccountStore *accountStore = [[ACAccountStore alloc] init];
// Step 0: Check that the user has local Twitter accounts
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter]) {
// Step 1: Obtain access to the user's Twitter accounts
ACAccountType *twitterAccountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter];
@paulthorsteinson
paulthorsteinson / gist:5653016
Last active December 17, 2015 18:28
iOS Dev School cut n paste
+(void)broadcastWeatherForCity:(NSString *)cityParameter
{
NSString *urlAsString = [NSString stringWithFormat:@"http://api.wunderground.com/api/da2802424490beb4/geolookup/conditions/forecast/q/%@", cityParameter];
NSURL *url = [NSURL URLWithString:urlAsString];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
AFJSONRequestOperation *operation = [AFJSONRequestOperation JSONRequestOperationWithRequest:request success:^(NSURLRequest *request, NSHTTPURLResponse *response, id JSON) {
// city
- (void)addPullToRefresh{
self.refreshControl = [[UIRefreshControl alloc] init];
[self.refreshControl addTarget:self action:@selector(getWeatherAsynchronous) forControlEvents:UIControlEventValueChanged];
self.refreshControl.attributedTitle = [[NSAttributedString alloc] initWithString:@"Refreshing Weather..."];
CGSize refreshSize = self.refreshControl.frame.size;
CGSize scrollSize = self.scrollView.frame.size;
[self.scrollView addSubview:self.refreshControl];
[self.scrollView setContentSize:CGSizeMake(scrollSize.width, scrollSize.height + refreshSize.height)];
}