Skip to content

Instantly share code, notes, and snippets.

@bcapps
bcapps / BofAScrubbing.sh
Created January 19, 2017 21:26
Bank of America allows downloading banking activity in a "printable text format." Use this command to scrub intra-bank transfers from that list to see all charges if you switch banks.
grep -vwE "(OVERDRAFT|overdraft|Overdraft|BKOFAMERICA MOBILE|CHECKCARD|KEEP THE CHANGE TRANSFER|Online Banking transfer|BankAmeriDeals CASHBACK|Preferred Rewards|Wire Transfer Fee)" yourExportFileName.txt > yourExportFileName-clean.txt
@bcapps
bcapps / UIViewController+LCKAdditions.m
Created December 12, 2013 16:53
The category we use in Velocity for adjusting a scroll view's insets when the keyboard shows and hides - behavior which used to be automatic in iOS 6 and is now manual in iOS 7. Call this method from observing both `UIKeyboardWillHideNotification` and `UIKeyboardWillShowNotification`.
@implementation UIViewController (LCKAdditions)
- (void)adjustScrollView:(UIScrollView *)scrollView forKeyboardChangeNotification:(NSNotification *)notification {
NSDictionary *keyboardInfo = [notification userInfo];
CGRect keyboardFrame = [[keyboardInfo valueForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue];
CGRect convertedFrame = [scrollView.superview convertRect:keyboardFrame fromView:scrollView.window];
CGFloat keyboardHeight = CGRectGetHeight(convertedFrame);
UIEdgeInsets contentInsets = scrollView.contentInset;