Skip to content

Instantly share code, notes, and snippets.

View romyilano's full-sized avatar
😎
improving

Romy romyilano

😎
improving
View GitHub Profile
//
// ExtensionURLRequest.swift
//
// Created by Abhishek Maurya on 16/07/20.
// Copyright © 2020. All rights reserved.
//
import Foundation
extension URLRequest {
@romyilano
romyilano / .gitattributes
Created March 24, 2020 17:54 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@romyilano
romyilano / gist:7fec2598d347a2c309655ca8f7467244
Created February 26, 2020 23:06 — forked from sabarasaba/gist:3080590
Remove directory from remote repository after adding them to .gitignore
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
@romyilano
romyilano / SupportCode.swift
Created January 23, 2018 05:47 — forked from acchou/SupportCode.swift
Playground support code for using RxSwift or any other framework that sends async events.
import Foundation
public func delay(_ delay: TimeInterval, closure: @escaping ()->()) {
DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
closure()
}
}
#if NOT_IN_PLAYGROUND
@romyilano
romyilano / gist:8ccb9ea4c12b99616ab8fa3cbf306d2c
Created January 2, 2018 05:20 — forked from glaurent/gist:aad82c4185f3c92f21dc
adding a video in a SceneKit scene using a SpriteKit SKVideoNode
let spriteKitScene = SKScene(size: CGSize(width: 1276.0 / 2.0, height: 712.0 / 2.0))
var videoSpriteKitNode:SKVideoNode?
let videoNode = SCNNode()
videoNode.geometry = SCNPlane(width: videoNodeWidth, height: videoNodeHeight)
// using SpriteKit scene with videonode inside
//
spriteKitScene.scaleMode = .AspectFit
// Node.js CheatSheet.
// Download the Node.js source code or a pre-built installer for your platform, and start developing today.
// Download: http://nodejs.org/download/
// More: http://nodejs.org/api/all.html
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
@romyilano
romyilano / ios-cell-registration-swift.md
Created March 14, 2017 20:52 — forked from gonzalezreal/ios-cell-registration-swift.md
iOS Cell Registration & Reusing with Swift Protocol Extensions and Generics

iOS Cell Registration & Reusing with Swift Protocol Extensions and Generics

A common task when developing iOS apps is to register custom cell subclasses for both UITableView and UICollectionView. Well, that is if you don’t use Storyboards, of course.

Both UITableView and UICollectionView offer a similar API to register custom cell classes:

public func registerClass(cellClass: AnyClass?, forCellWithReuseIdentifier identifier: String)
public func registerNib(nib: UINib?, forCellWithReuseIdentifier identifier: String)
//
// CoreDataContextWatcher.swift
// ContextWatcher
//
// Created by Michal Zaborowski on 10.05.2016.
// Copyright © 2016 Inspace Labs Sp z o. o. Spółka Komandytowa. All rights reserved.
//
import Foundation
import CoreData
@romyilano
romyilano / storage.swift
Created February 3, 2017 00:03 — forked from avdyushin/storage.swift
CoreData stack for iOS 9 and iOS 10 using Swift 3
//
// Storage.swift
//
// Created by Grigory Avdyushin on 30.06.16.
// Copyright © 2016 Grigory Avdyushin. All rights reserved.
//
import UIKit
import CoreData
import UIKit
class MyViewController: UIViewController {
// Store ref and handle as implicitly unwrapped optionals
// explanation about this > because the initializer might not be called esp from the storyboard
var ref: Firebase!
var handle: UInt!