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 {
Component,
OnInit,
Input,
ViewChild,
ElementRef,
HostBinding
} from '@angular/core';
@Component({
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
<w-in-view-item>
<!-- 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. -->
</w-in-view-item>
...or any other content can be here
<w-in-view-item>
View egghead-screencast-guideline.md

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.

Resolution

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
ThomasBurleson / es6-curry.md
Created December 18, 2017 12:41 — forked from JamieMason/es6-partial-application.md
ES6 Curry Function
View es6-curry.md

ES6 Curry Function

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

Example

@ThomasBurleson
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
ThomasBurleson / pr.md
Created November 13, 2016 13:15 — forked from piscisaureus/pr.md
Checkout github pull requests locally
View pr.md

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 = git@github.com:joyent/node.git

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
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 http://angularjs.org
* License: MIT
*/
/**
* Backward compatibility module for AngularJS
* @author Vojta Jina <vojta.jina@gmail.com>
*
View pr_clean.js
var GithubAPI = require('github');
var child_process = require('child_process');
var github = new GithubAPI({
version: '3.0.0',
});
github.authenticate({
type: "oauth",
username: 'DevVersion-Bot',
@ThomasBurleson
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>