Skip to content

Instantly share code, notes, and snippets.

View iannase's full-sized avatar
🎯
Focusing

Ian Annase iannase

🎯
Focusing
View GitHub Profile
@iannase
iannase / Podfile
Created July 30, 2020 17:09
Remove duplicate symbol file warning from app uploads
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings[‘DEBUG_INFORMATION_FORMAT’] = ‘dwarf’
end
end
end
@iannase
iannase / apiCallInSwift.swift
Last active March 28, 2020 15:54
How to make an API call on JSON data that has an array.
Alamofire.request(apiURL).responseJSON { (response) in
if response.result.isSuccess {
guard let data = response.result.value as? [String: Any] else { return }
guard let results = data["results"] as? NSArray else { return }
for result in results {
if let result = result as? [String: Any] {
if let elevation = result["elevation"] as? Double {
}
@iannase
iannase / HorizontalPagingScrollView.swift
Last active February 1, 2020 17:02
Horizontal Paging Scroll View in Swift 5
import UIKit
class SliderViewController: UIViewController, UIScrollViewDelegate {
@IBOutlet weak var scrollView: UIScrollView!
@IBOutlet weak var pageControl: UIPageControl!
var contentWidth: CGFloat = 0.0
let imageNames = ["First", "Second", "Third", "Fourth"]
@iannase
iannase / practice.swift
Created October 10, 2019 14:59
Get warmed up to code in Swift
// comment
/* multi-line
comment */
let x = true
var y = false
let z = 1
var o: String?
@iannase
iannase / ar.swift
Created November 5, 2018 15:10
Basic ARKit ViewController
import UIKit
import ARKit
class ARViewController: UIViewController, ARSCNViewDelegate {
@IBOutlet weak var sceneView: ARSCNView!
override func viewDidLoad() {
super.viewDidLoad()
sceneView.delegate = self
import os
import json
import requests
from datetime import datetime
from prettytable import PrettyTable
from colorama import Fore, Back, Style
convert = 'USD'
listings_url = 'https://api.coinmarketcap.com/v2/listings/?convert=' + convert
import json
import requests
from datetime import datetime
convert = 'USD'
listings_url = 'https://api.coinmarketcap.com/v2/listings/?convert=' + convert
url_end = '?structure=array&convert=' + convert
request = requests.get(listings_url)
import json
import requests
from datetime import datetime
ticker_url = 'https://api.coinmarketcap.com/v2/ticker/?structure=array'
limit = 100
start = 1
sort = 'id'
convert = 'USD'
import json
import requests
from datetime import datetime
listings_url = 'https://api.coinmarketcap.com/v2/listings/'
request = requests.get(listings_url)
results = request.json()
# print(json.dumps(results, sort_keys=True, indent=4))
import json
import requests
from datetime import datetime
convert = 'USD'
global_url = 'https://api.coinmarketcap.com/v2/global/' + '?convert=' + convert
request = requests.get(global_url)
results = request.json()