Skip to content

Instantly share code, notes, and snippets.

@joelbinn
joelbinn / cancellable-promise.spec.ts
Created October 8, 2019 07:03
A typescript implementation of a cancellable promise
import { CancellablePromise } from './cancellable-promise'
describe('CancellablePromise', () => {
describe('when cancelling', () => {
it( 'should reject with information of this', async () => {
const p: CancellablePromise<string> = new CancellablePromise(new Promise<string>(resolve => undefined))
p.cancel()
await expect(p).rejects.toEqual({wasCancelled: true})
@whitingx
whitingx / meta-tags.md
Created October 5, 2012 16:41 — forked from kevinSuttle/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@PhirePhly
PhirePhly / Makefile
Created June 12, 2012 03:12
A crazy simple SMTP server, for educational purposes only.
default:
cc ccsmtp.c -o ccsmtpd -lpthread