Skip to content

Instantly share code, notes, and snippets.

View mnbayan's full-sized avatar
🏠
Working from home

Mylene Bayan mnbayan

🏠
Working from home
  • Manila, Philippines
View GitHub Profile
@mnbayan
mnbayan / Embedly
Created December 1, 2014 09:09
Made available to be used with RESTKit 0.23.3
//
// Embedly.m
// Embedly
//
// Created by Mylene Bayan 10/16/2014.
//
#import "Embedly.h"
@implementation Embedly
@mnbayan
mnbayan / MKMapViewExtension.swift
Created February 23, 2015 02:33
MKMapView extension to center map to coordinates with defined zoom level using Swift language
//
// MKMapViewExtension.swift
// AutocompleteTextfieldSwift
//
// Created by Mylene Bayan on 2/22/15.
// Copyright (c) 2015 MaiLin. All rights reserved.
//
import Foundation
import MapKit
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
NSString *scheme = [[[request URL] scheme] lowercaseString];
if([scheme isEqualToString:@"optimizelygoal"]) {
// Pull the encoded JSON string out of the querystring
// Decode the string, convert JSON string into usable object
// Handle the message
// Return NO to prevent the webview from navigating
NSDictionary *userInfo = [self userInfoFromQuery:request.URL.absoluteString];
if (userInfo[@"name"] != nil){
@mnbayan
mnbayan / NSManagedObjectContext+Addition
Created October 17, 2015 13:29
NSManagedObjectContext extension that handles saving. Logs all errors if there are any.
import Foundation
import CoreData
extension NSManagedObjectContext{
func saveContext(){
if self.hasChanges {
do{
try self.save()
}
@mnbayan
mnbayan / cloudSettings
Last active September 15, 2020 10:51
React Native VSCode Settings
{"lastUpload":"2020-09-15T10:51:53.024Z","extensionVersion":"v3.4.3"}