Skip to content

Instantly share code, notes, and snippets.

View Guferos's full-sized avatar

Damian Guferos

  • Coventry, United Kingdom
View GitHub Profile
protocol ObservableObject {}
extension RealmSwift.Object: ObservableObject {}
extension ObservableObject where Self: RealmSwift.Object {
func toObservable() -> ObservableRealmObject<Self> {
return ObservableRealmObject(self)
}
}
extension RealmSwift.Results where Element: Object {
func toObservable() -> ObservableRealmArray<Element> {
return ObservableRealmArray(self)
}
}
public class ObservableRealmArray<Item: RealmSwift.Object>: SignalProtocol {
fileprivate let result: RealmSwift.Results<Item>
@Guferos
Guferos / exampleContent.html
Created August 1, 2017 18:19
Example formatting for the MVP articles
<!--
======================================================================================
Day 1
Article 1 - http://www.belongto.org/resource.aspx?contentid=4574
What is emotional wellbeing and why is it important?
======================================================================================
-->
<div class="header">
<h1 class="title">What is emotional wellbeing and why is it important?</h1>
@Guferos
Guferos / knowledge.plist
Created June 16, 2017 13:13
Example structure for the articles/videos
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Knowledge.plist
eightySevenPercent
Created by Damian Wojtczak on 15/06/2017.
Copyright (c) 2017 Exploding Phone. All rights reserved.
-->
<plist version="1.0">
@Guferos
Guferos / local.config.php
Created May 1, 2017 14:38
Example local config file for the Codeigniter
<?php
return array(
'database' => array(
'db' => array(
'dsn' => '',
'hostname' => '127.0.0.1:8889',
'username' => 'root',
'password' => 'root',
'database' => 'europackaging_webapp',
'dbdriver' => 'mysqli',