Skip to content

Instantly share code, notes, and snippets.

View iros's full-sized avatar

Irene Ros iros

View GitHub Profile

Inspired by Robert O'Callahan's blog

To reduce the need for "visual confirmation" tests:

  • store the base-64 encoded data-uri of a reference png as a string
  • copy the outerHTML of your test fixture into an SVG wrapper, prefixed with "data:image/svg+xml,"
  • set the src of an image to the value of the SVG wrapper
  • copy the image into a canvas context
  • assert equality of canvas.context.toDataURL() and previously stored reference string
@cobyism
cobyism / gh-pages-deploy.md
Last active April 18, 2024 13:44
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing