View settings.json5
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
{ | |
"files.exclude": { | |
// ## WHATS THE DEAL? | |
// | |
// VS Code doesn't support: | |
// | |
// * glob negation pattern (like globs usually have) | |
// * `false` values that can opt out | |
// * a `files.include` | |
// * support for auto excluding .gitignore |
View example_usage.rb
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
def purchase_single_product(identifier) | |
NSLog "Starting purchase process for #{identifier}." | |
@iap_helper = IAPHelper.new(NSSet.setWithArray([identifier])) | |
@iap_helper.cancelled = cancelled_transaction | |
@iap_helper.success = transaction_successful | |
@iap_helper.request_product_info do |success, products| | |
if success && products.is_a?(Array) && products.count == 1 | |
@iap_helper.buy_product(products.first) | |
else |
View birthday_liker.rb
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
require 'date' | |
require 'koala' | |
class BirthdayLiker | |
FACEBOOK_TOKEN = 'your_oauth_key' | |
BIRTHDAY_WORDS = %w(birthday bday birfday birth born hbd) | |
THANKS_OPTIONS = ['Thank you!', 'Thanks!', 'Appreciate it!', 'Danke!', ':)'] | |
DATE_TIME_FORMAT = '%Y-%m-%d' | |
def initialize(birthdate, opts={}) |
View WebViewController.rb
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
class RootController < UIViewController | |
def viewDidLoad | |
super | |
@my_web_view = UIWebView.alloc.initWithFrame(view.bounds) | |
@my_web_view.delegate = self | |
@my_web_view.scalesPageToFit = FALSE | |
view.addSubview(@my_web_view) |