Skip to content

Instantly share code, notes, and snippets.

View speaktoalvin's full-sized avatar

Alvin speaktoalvin

View GitHub Profile
struct Hoge: Storagable {
let id: Int
let name: String
}
protocol Storagable: Codable {}
extension Storagable {
func save(key: String = "\(Self.self)", userDefaults: UserDefaults = .standard) throws {
let data = try JSONEncoder().encode(self)
//
// ImageCache.swift
//
// Created by Alec O'Connor on 3/6/18.
// Copyright © 2018 Alec O'Connor. All rights reserved.
//
import UIKit
class ImageCache {
@PaulTaykalo
PaulTaykalo / OptionalExtension.swift
Last active November 27, 2016 16:49
Optional Loggin extension
import Foundation
//
// MARK:- Private
//
class MyAwesomeLogger {
static func log(message: String) {
print(message)
}
@leonardofed
leonardofed / README.md
Last active July 5, 2024 01:31
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


things I don't know

I took this list from What CS majors should know.

I think it is fun to list things I don't know so I did it =D. I actually found it to be a cool exercise -- maybe I should do a fun graphics project and learn about Open GL!

i wrote this because, while i think the things on this list are potentially worth knowing, and I actually think it's an awesome list of project ideas as well as good food for thought for people developing CS curricula (many of the things I don't know are great exercises!) -- I thought it was really weird to say that every CS student should know all of them. I have a CS degree and I learned very few of the things I do know inside my degree.

I classify "do know" as anything that I have a reasonable grasp of or at least some basic experience with -- the kind of experience I'd expect a CS student to be able to get. If I say I don't know something, it means either I know pretty much nothing about it (for "gr

import UIKit
import Foundation
import ReactiveCocoa
import Result
import Dwifft
/**
Encapsulates information about collection view nib/cell registration.
- Nib: UINib.
import UIKit
import XCPlayground
class ViewController: UIViewController {
func action() { print("Bing!") }
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .whiteColor()
@speaktoalvin
speaktoalvin / gcd
Created October 14, 2015 07:20
Grand Central Dispatch
// An easy way to get different queue's in your project.
//
// GCDMan.swift
// GCDGhost
//
// Created by Alvin Varghese on 15/09/15.
// Copyright (c) 2015 iDreamCode. All rights reserved.
//
@speaktoalvin
speaktoalvin / IAPHelper.txt
Last active April 29, 2021 04:07
In App Purchase in Swift, with Receipt Validation
import UIKit
import StoreKit
//MARK: SKProductsRequestDelegate
extension IAPHelpers : SKProductsRequestDelegate
{
func productsRequest(request: SKProductsRequest, didReceiveResponse response: SKProductsResponse)
{
//
// WatchSessionManager.swift
// WatchConnectivityDemo
//
// Created by Natasha Murashev on 9/3/15.
// Copyright © 2015 NatashaTheRobot. All rights reserved.
//
import WatchConnectivity