This file contains hidden or 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
// | |
// SelfSizedTableView.swift | |
// AdjustableTableView | |
// | |
// Created by Dushyant Bansal on 25/02/18. | |
// Copyright © 2018 db42.in. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or 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 'aws-sdk-s3' # v2: require 'aws-sdk' | |
ACCESS_KEY_ID = "" | |
SECRET_ACCESS_KEY = "" | |
REGION_ID = "us-east-1" | |
BUCKET_NAME = "bucket-name" | |
def uploadS3 | |
credentials = Aws::Credentials.new( | |
ACCESS_KEY_ID, |
This file contains hidden or 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
//Property List file name = regions.plist | |
let pListFileURL = Bundle.main.url(forResource: "regions", withExtension: "plist", subdirectory: "") | |
if let pListPath = pListFileURL?.path, | |
let pListData = FileManager.default.contents(atPath: pListPath) { | |
do { | |
let pListObject = try PropertyListSerialization.propertyList(from: pListData, options:PropertyListSerialization.ReadOptions(), format:nil) | |
//Cast pListObject - If expected data type is Dictionary | |
guard let pListDict = pListObject as? Dictionary<String, AnyObject> else { | |
return | |
} |
This file contains hidden or 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 parse_properties_txt(fn) | |
start = false | |
properties = {} | |
model = nil | |
File.read(fn).lines.each do |l| | |
if l.start_with?("@interface") && l.include?("JSONModel") | |
model = l.split[1].tr(":","") | |
start = true |