Skip to content

Instantly share code, notes, and snippets.

David Marquis davidmarquis

Block or report user

Report or block davidmarquis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am davidmarquis on github.
  • I am davidmarquis ( on keybase.
  • I have a public key ASC4fsgvckvQCU3bPBpBYwAZQkOdhlfg_qZodcxAEais3go

To claim this, I am signing this object:

davidmarquis / angular2-lazy-load-images-with-blazy.ts
Last active Apr 11, 2017
Angular 2: Lazy-loading images using bLazy.js
View angular2-lazy-load-images-with-blazy.ts
import { Directive, ElementRef, Input, AfterViewChecked, OnDestroy } from "@angular/core";
import * as Blazy from "blazy";
* Directive to setup lazy image loading using bLazy.
* Apply the directive on a container element that is a parent of `img` elements configured for bLazy.
* The container element must have an ID and be scrollable (overflow: scroll).
* Sample usage:
davidmarquis / angular2-if-media-query-directive.ts
Last active Aug 24, 2019
Angular 2: Conditional output from media query using a structural directive
View angular2-if-media-query-directive.ts
import { Directive, TemplateRef, ViewContainerRef } from "@angular/core";
import { isBlank } from "@angular/core/src/facade/lang";
* How to use this directive?
* ```
* <div *ngIfMediaQuery="'(min-width: 500px)'">
* Div element will exist only when media query matches, and created/destroyed when the viewport size changes.
davidmarquis /
Created Aug 7, 2015
Django CMS disable toolbar for specific URLs
Hi-jacked version of Django CMS's toolbar middleware that
excludes the toolbar from specific URLs (as defined in settings).
To use it, replace 'cms.middleware.ToolbarMiddleware' with a
reference to this class.
Then set `CMS_TOOLBAR_EXCLUDED_URLS` in your Django settings:
You can’t perform that action at this time.