Skip to content

Instantly share code, notes, and snippets.

View jonasalbert's full-sized avatar

jonasalbert jonasalbert

View GitHub Profile
@jonasalbert
jonasalbert / Dust.js
Created September 22, 2017 19:30
Asynchronous Javascript templating for the browser and server
http://www.dustjs.com/guides/getting-started/
@jonasalbert
jonasalbert / torrent pluralsight - ASP.net
Created September 22, 2017 19:53
torrent pluralsight - ASP.net
http://tparser.org/Pluralsight-ASP.NET
@jonasalbert
jonasalbert / Read .json in ASP.NET Core
Last active October 4, 2017 04:07
How to read AppSettings values from Config.json in ASP.NET Core
https://stackoverflow.com/questions/31453495/how-to-read-appsettings-values-from-config-json-in-asp-net-core
https://stackoverflow.com/questions/41738692/read-appsettings-json-in-main-program-cs
@jonasalbert
jonasalbert / learnentityframeworkcore
Created October 6, 2017 21:45
learnentityframeworkcore
http://www.learnentityframeworkcore.com/
@jonasalbert
jonasalbert / SOLID principles
Created October 22, 2017 15:11
SOLID are five basic principles whichhelp to create good software architecture. SOLID is an acronym where:- S stands for SRP (Single responsibility principle O stands for OCP (Open closed principle) L stands for LSP (Liskov substitution principle) I stands for ISP ( Interface segregation principle) D stands for DIP ( Dependency inversion princip…
https://www.codeproject.com/Articles/703634/SOLID-architecture-principles-using-simple-Csharp
https://www.devart.com/dotconnect/sqlite/docs/Tutorial_EFCore.html
@jonasalbert
jonasalbert / core - unit of work pattern
Created October 31, 2017 16:19
core - unit of work pattern
https://dotnetthoughts.net/implementing-the-repository-and-unit-of-work-patterns-in-aspnet-core/
@jonasalbert
jonasalbert / Hide Keyboard : UITableViewController
Created December 13, 2017 08:40
Hide Keyboard : UITableViewController
override func viewDidLoad() {
super.viewDidLoad()
tableView.keyboardDismissMode = UIScrollViewKeyboardDismissMode.onDrag
}
@jonasalbert
jonasalbert / Implement Events in Swift
Created December 14, 2017 03:28
Implement Events in Swift
http://blog.scottlogic.com/2015/02/05/swift-events.html
I initially started writing a blog post that discussed various alternatives to Key-Value-Observing (KVO) in Swift, however, I found myself writing more about the task of implementing events in Swift. So, I’ve decided to split the problem in two, in this post I’ll cover events, and I’ll follow-up with the KVO post later on.
I’m certainly not the first to blog about this topic, Mike Ash published a great article on Swift implementation of NSNotification just last week. However, in this post I’d like to approach the problem in a slightly different way, starting with a naïve implementation.
Let’s start at the beginning …
WHAT ARE EVENTS?
Cocoa has a number of techniques that allow classes to collaborate in a loosed-coupled fashion via some form of notification, including target-action, the delegate pattern, NSNotification and KVO. These are all forms of the classic Observer Pattern, yet all are different implementations, and each have their own failings.
https://www.raywenderlich.com/174025/lightweight-migrations-in-core-data-tutorial