Skip to content

Instantly share code, notes, and snippets.

View keith-kurak's full-sized avatar

Keith Kurak keith-kurak

View GitHub Profile
@keith-kurak
keith-kurak / decouplednotificationcentersubscription.swift
Last active April 23, 2017 20:58
Decoupled notification center subscription
//1) Notification center-specific implementation of UpdateObserving
class NotificationObserver: UpdateObserving {
var observer: NSObjectProtocol?
init(notificationObserver: NSObjectProtocol?) {
self.observer = notificationObserver
}
@keith-kurak
keith-kurak / genesis_public_key
Created February 21, 2018 14:40
Genesis Public Key
04132fa5fe0845de08d684d9494820bfb74f671b3a748425acf8b345239a681fe0807fba537585181c2d6049c58fcb8c3a5f58162db16dfde0c1f146649178ba7b
@keith-kurak
keith-kurak / manifest.json
Created May 11, 2019 13:08
Manifest.json for PWA
{
"short_name": "A short name",
"name": "A long name",
"prefer_related_applications": false,
"icons": [
{
"src": "icon-192.png",
"type": "image/png",
"sizes": "192x192"
},
<link rel="apple-touch-icon" sizes="512x512" href="icon-512.png">
@keith-kurak
keith-kurak / html head snippet
Created May 11, 2019 13:31
html head snippet for service worker
<link rel="manifest" href="/manifest.json">
<link rel="apple-touch-icon" sizes="512x512" href="icon-512.png">
<script type="application/javascript">
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js');
}
let deferredPrompt;
window.addEventListener('beforeinstallprompt', (e) => {
// Prevent Chrome 67 and earlier from automatically showing the prompt
@keith-kurak
keith-kurak / osx_install.sh
Last active August 22, 2019 03:01 — forked from cassiocardoso/osx_install.sh
Install most of my Apps with homebrew & cask
#!/bin/sh
read -p "Press any key to continue... " -n1 -s
echo '\n'
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# fastlane wants bash profile already there, maybe others do?
touch ~/.bash_profile
# cli installs
@keith-kurak
keith-kurak / 01: Hello, Navigation!
Last active December 29, 2021 16:09
FERN Stack Part 1: Hello, Navigation!
Edit each file in order in this gist to complete the section!
@keith-kurak
keith-kurak / 02: Hello, MobX State Tree!
Last active January 12, 2022 03:55
02: Hello, MobX State Tree!
Edit each file in order in this gist to complete the section!
@keith-kurak
keith-kurak / 03: Hello, Firebase!
Last active January 12, 2022 04:10
03: Hello, Firebase!
// add Firebase as backend, loading and saving channels
@keith-kurak
keith-kurak / 04: Hello, Authentication!
Last active December 29, 2021 18:03
04: Hello, Authentication!
Follow the steps below to add login capabilities!