Skip to content

Instantly share code, notes, and snippets.

View aaronksaunders's full-sized avatar

Aaron K Saunders aaronksaunders

View GitHub Profile
@knvaughn
knvaughn / US-States-and-Cities.json
Last active December 18, 2024 08:57 — forked from ahmu83/US_States_and_Cities.json
List of US States and Cities in JSON format.
{
"Alabama": [
"Alabaster",
"Albertville",
"Alexander City",
"Andalusia",
"Anniston",
"Arab",
"Athens",
"Atmore",
/**
Ionic Vue 0.0.8-next prerelease adds support for v-model to all Ionic inputs.
To try it out, run
npm install @ionic/vue@next
*/
<template>
<div class="ion-page">
<ion-header>
@phortx
phortx / model.js
Last active May 3, 2020 22:27
Vuex-ORM model base class with convenience methods
import { Model as ORMModel } from '@vuex-orm/core';
/**
* Wrapper for models to provide model level convenience methods for interacting with the store and persistence.
* Will be built into vuex-orm in the future. See https://github.com/vuex-orm/vuex-orm/issues/60
*
* Requires the inflected npm package.
*/
export default class Model extends ORMModel {
/**
import * as fb from "firebase";
import { computed, observable, runInAction } from "mobx";
type Query = fb.firestore.Query;
type DocumentReference = fb.firestore.DocumentReference;
type DocumentSnapshot = fb.firestore.DocumentSnapshot;
type LoadingDocumentSnapshot = DocumentSnapshot | undefined;
type Dictionary<T> = { [key: string]: T };
// type QuerySnapshot = fb.firestore.QuerySnapshot;
// type LoadingCollectionSnapshot = QuerySnapshot | undefined;
@rob3c
rob3c / ngrx-remote-devtools-proxy-instructions.md
Last active June 12, 2024 09:17
Using @ngrx/store-devtools remotely with Ionic 2

Ok, I have on-device remote store debugging working with Ionic 2. Unfortunately, time-travel and state import doesn't work with store-devtools yet (see ngrx/store-devtools#33 and ngrx/store-devtools#31), but at least the Inspector, Log Monitor and Graph is working remotely. Here's how:

First, add https://github.com/zalmoxisus/remotedev to the project:

> npm install --save-dev remotedev

Then add these devtools proxy wrapper classes to the project. They provide the same interface as the browser extension so store-devtools will think it's just talking to the chrome extension. I left in the trace debug logging so you can clearly see what's happening in the console, but it's easy to remove if you want.

remote-devtools-proxy.ts

@ozexpert
ozexpert / ionic2.image-cache.directive.ts
Last active February 21, 2024 11:13
AngularJS2 / Ionic2 : ImageCache Directive to use with imgcache.js
import { Directive, ElementRef, Input } from '@angular/core';
declare var ImgCache: any;
@Directive({
selector: '[image-cache]'
})
export class ImageCacheDirective {
constructor (
private el: ElementRef
@puf
puf / index.html
Last active January 15, 2023 19:41
Zero to App: Develop with Firebase (for Web - Google I/O 2016)
<html>
<head>
<script src="https://www.gstatic.com/firebasejs/3.0.0/firebase.js"></script>
<title>ZeroToApp</title>
<style>
#messages { width: 40em; border: 1px solid grey; min-height: 20em; }
#messages img { max-width: 240px; max-height: 160px; display: block; }
#header { position: fixed; top: 0; background-color: white; }
.push { margin-bottom: 2em; }
@keyframes yellow-fade { 0% {background: #f2f2b8;} 100% {background: none;} }
@puf
puf / ChatMessage.java
Last active July 12, 2021 21:56
Zero to App: Develop with Firebase (for Android - Google I/O 2016)
package com.google.firebase.zerotoapp;
public class ChatMessage {
public String name;
public String message;
public ChatMessage() {
}
public ChatMessage(String name, String message) {
@asciimike
asciimike / AppDelegate.swift
Last active July 12, 2021 21:56
Zero to App: Develop with Firebase (for iOS - Google I/O 2016)
///
// AppDelegate.swift
// ZeroToApp
//
import UIKit
import Firebase
import FBSDKCoreKit
@UIApplicationMain
@btroncone
btroncone / ngrxintro.md
Last active November 5, 2024 12:20
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents