Skip to content

Instantly share code, notes, and snippets.

View ThomasBurleson's full-sized avatar

Thomas Burleson ThomasBurleson

View GitHub Profile
View lazy-img.component.ts
import {
} from '@angular/core';
View angular-in-view-directives.html
<!-- wInViewRoot directive is needed to specify the `root` for `IntersectionObserver` and some other it's options e.g. `margin` -->
<div class="container" wInViewRoot="viewport">
Any content can be here
<!-- Content will be replaced by a placeholder <div> with the same height as original content.
Also `InViewItemComponent`s change detector will be detached when it become invisible which means
all the content's change detectors won't be reachable and will be inactive as well. -->
...or any other content can be here

Recording a Great Coding Screencast

The Screen

First and foremost a coding screencast is about the code, and we need to make sure it looks great. There are a few aspects to this that help ensure that is the case.


720p is the target resolution. In pixel terms this is 1280x720. We've gotten the best results when we record at 2560x1440 in a HiDPI (pixel double) mode, giving an effective visible resolution of 1280x720, but extremely crisp. This resolution is achievable on 27" monitors and retina MBPs.

ThomasBurleson /
Created December 18, 2017 12:41 — forked from JamieMason/
ES6 Curry Function

ES6 Curry Function

const curry = (fn, ...cache) => (...args) => {
  const all = cache.concat(args);
  return all.length >= fn.length ? fn(...all) : curry(fn, ...all);


ThomasBurleson / gist:072c194a8142d93154b480bd0c17d96a
Created October 21, 2017 22:05 — forked from jenkek/gist:8553579
How to: Delete a remote Git tag
View gist:072c194a8142d93154b480bd0c17d96a
# remove local tag
git tag -d tagname-123
# remove remote tag
git push origin :refs/tags/tagname-123
# delete multiple tags by patterns
for tag in $(git tag -l '[production|tusur]*'); do git tag -d $tag; git push origin :refs/tags/$tag; done
ThomasBurleson /
Created November 13, 2016 13:15 — forked from piscisaureus/
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

ThomasBurleson / angular-bc.js
Created February 7, 2012 22:41 — forked from vojtajina/angular-bc.js
Angular: decorates/intercepts $controller service
View angular-bc.js
* @license AngularJS
* (c) 2010-2012 AngularJS
* License: MIT
* Backward compatibility module for AngularJS
* @author Vojta Jina <>
View pr_clean.js
var GithubAPI = require('github');
var child_process = require('child_process');
var github = new GithubAPI({
version: '3.0.0',
type: "oauth",
username: 'DevVersion-Bot',
ThomasBurleson / gist:2f37d55c98780dd2a367
Created February 7, 2016 12:21 — forked from rootscity/gist:fcf909f5820407a67c8e
angular-material modal drag directive
View gist:2f37d55c98780dd2a367
// Usage
//<md-dialog rc-drag="md-toolbar" ng-cloak>
// <form>
// <md-toolbar>
// ...
// </md-toolbar>
// <md-dialog-content>
// ...
// </md-dialog-content>