Skip to content

Instantly share code, notes, and snippets.

Want to support me and my work?

Phan An phanan

Want to support me and my work?
View GitHub Profile

Keybase proof

I hereby claim:

  • I am phanan on github.
  • I am phanan ( on keybase.
  • I have a public key ASAi51vqQYcLGu2lPXcdCCNWLQsOte_t0aXAPF21r4yo5Ao

To claim this, I am signing this object:

phanan / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
phanan / runner.js
Last active Mar 13, 2021
Record a webpage with PhantomJS and FFMpeg
View runner.js
// Run this from the commandline:
// phantomjs runner.js | ffmpeg -y -c:v png -f image2pipe -r 24 -t 10 -i - -c:v libx264 -pix_fmt yuv420p -movflags +faststart output.mp4
var page = require('webpage').create(),
address = '',
duration = 3, // duration of the video, in seconds
framerate = 24, // number of frames per second. 24 is a good value.
counter = 0,
width = 500,
height = 500;