Skip to content

Instantly share code, notes, and snippets.

View paulsumit1993's full-sized avatar
๐Ÿ“‚
https://apple.co/2Cmbyqw

Sumit Paul paulsumit1993

๐Ÿ“‚
https://apple.co/2Cmbyqw
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.972549 0.972549 0.94902 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>SFMono-Regular - 18.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>
<string>0.972549 0.972549 0.94902 1</string>
@paulsumit1993
paulsumit1993 / Scores.swift
Created July 4, 2017 20:58
Swift 4 playground for exam scores calculation
//Swift 4 code, runs on Xcode 9 Beta in playground
import Foundation
// Mock JSON for testing the code along with decoding and encoding JSON using codable protocol
let studentScores = """
{
"student1": {
"id": 123456789,
"scores": {
@paulsumit1993
paulsumit1993 / CodableExample.swift
Last active June 19, 2019 14:44
Swift 4 JSON decoding using Codable protocol, newsapi.org web service in Swift playground (Xcode 9 Beta)
// A playground to demonstrate the use of Swift 4 Codable Protocol to fetch data from a web service and decode it into a native swift model
import Foundation
import PlaygroundSupport
// swift result type https://www.cocoawithlove.com/blog/2016/08/21/result-types-part-one.html#the-result-type
enum ResultType<T> {
case Success(T)
case Failure(e: Error)
@paulsumit1993
paulsumit1993 / swift learning path.swift
Last active December 17, 2016 07:57
Learning path for Swift mastery
print("Hello, Swift ๐Ÿ‡ฎ๐Ÿ‡ณ")
let message = "Want to learn Swift but overwhelmed by the sheer number of resources available on the web?" +
"Well, fret not, as we are bringing you a learning path to follow to ease your swift learning experience," +
"for you to level up and take your Swift knowledge to the next level ๐ŸŽ‰"
learnMore()
/* Watch this space for updates */