Skip to content

Instantly share code, notes, and snippets.

Avatar
📗
Building railsdevs in public.

Joe Masilotti joemasilotti

📗
Building railsdevs in public.
View GitHub Profile
@joemasilotti
joemasilotti / Gemfile
Last active Jan 21, 2022
How To Test PDFs with Capybara Blog post with details: http://pivotallabs.com/test-pdfs-with-capybara/
View Gemfile
group :test do
gem 'rspec-rails'
gem 'capybara'
gem 'pdf-reader'
end
View XcodeCheatSheet.md

##Xcode Locations

###Xcode Provisioning Profiles:

~/Library/MobileDevice/Provisioning\ Profiles

###Xcode Font and Color Schemes:

~/Library/Developer/Xcode/UserData/FontAndColorThemes
@joemasilotti
joemasilotti / killsim.sh
Last active Oct 17, 2020
Kill iOS Simulator Zombie Processes
View killsim.sh
ps aux | grep _sim | grep -v grep | awk '{print $2}' | xargs kill -9 2>/dev/null
@joemasilotti
joemasilotti / rm_conflicted.sh
Last active Aug 29, 2015
Remove Dropbox Conflicted Files
View rm_conflicted.sh
find . -type f -name "* conflicted *" -exec rm -f {} \;
@joemasilotti
joemasilotti / remove_tag
Created May 11, 2014
Git: Remove remote tag
View remove_tag
git tag -d 12345
git push origin :refs/tags/12345
@joemasilotti
joemasilotti / About.md
Last active Mar 26, 2020
Building NSURL Queries with NSURLQueryItems and NSURLComponents
@joemasilotti
joemasilotti / About.md
Last active Feb 25, 2016
NSDate Manipulation in iOS 8
View About.md

This gist accompanies the blog post NSDate Manipulation Made Easy in iOS 8.

Apple quietly introduced a whole new suite of public API methods to NSCalendar in iOS 8 titled “Calendrical Calculations”. For some reason they seemed to have forgotten to include them in the public documentation on their developer site. Fortunately, digging in to the header file in Xcode reveals lots of descriptive comments about how to use these powerful new ways of interacting with NSDate objects.

View .gitconfig
[alias]
yesterday = log --graph --decorate --oneline --after='yesterday' --until='today midnight’
@joemasilotti
joemasilotti / ABVFormatter.h
Last active Aug 29, 2015
How to format ABV% in Objective-C.
View ABVFormatter.h
#import <Foundation/Foundation.h>
@interface ABVFormatter : NSObject
- (NSString *)formattedABV:(NSNumber *)abv;
@end
@joemasilotti
joemasilotti / Backgrounder.h
Created Jul 7, 2015
Completion Blocks in Cedar
View Backgrounder.h
typedef void(^BackgroundCompletion)();
@interface Backgrounder : NSObject
- (void)executeInBackground:(BackgroundCompletion)completion;
@end