Skip to content

Instantly share code, notes, and snippets.

View richnicholls404's full-sized avatar

Rich Nicholls richnicholls404

View GitHub Profile
@richnicholls404
richnicholls404 / meteorCollectionInRedux.js
Last active December 8, 2016 11:50
Store a Meteor Collection in Redux
import { combineReducers, dispatch } from 'redux';
import * as '_' from 'lodash';
//globals: SubsManager
import { MyCollection } from './MyCollection';
// queue initial data load, otherwise you could be making 1000s of pointless immutable objects
const queuedState = {};
// watch changes to the collection. Save changes before ready to a queue, otherwise dispatch action on store
@richnicholls404
richnicholls404 / gist:7449378
Last active October 27, 2020 06:09
Register Service Provider and assign a Facade alias programatically in Laravel (such as inside a package)
<?php namespace Cavedwellerrich\MyPackage;
use Illuminate\Support\ServiceProvider;
use Illuminate\Foundation\AliasLoader;
class MyPackageServiceProvider extends ServiceProvider {
//...
public function register()