Skip to content

Instantly share code, notes, and snippets.

View phanan's full-sized avatar
🦄
Want to make my coffee addiction even worse? https://bit.ly/sponsor-phanan

Phan An phanan

🦄
Want to make my coffee addiction even worse? https://bit.ly/sponsor-phanan
View GitHub Profile
@phanan
phanan / runner.js
Last active September 22, 2022 11:05
Record a webpage with PhantomJS and FFMpeg
// 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 = 'http://s.codepen.io/phanan/fullembedgrid/YPLewm?type=embed&safe=true&_t=1424767252279',
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;
@phanan
phanan / 0_reuse_code.js
Last active August 29, 2015 14:28
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Keybase proof

I hereby claim:

  • I am phanan on github.
  • I am phanan (https://keybase.io/phanan) on keybase.
  • I have a public key ASAi51vqQYcLGu2lPXcdCCNWLQsOte_t0aXAPF21r4yo5Ao

To claim this, I am signing this object:

@phanan
phanan / MyList.vue
Last active February 2, 2023 17:10
Virtual scroller with Vue Composition API
<template>
<VirtualScroller v-slot="{ item }" :item-height="35" :items="myMassiveArray">
<div :item="item" :key="item.id">{{ item.details.i.guess? }}</div>
</VirtualScroller>
</template>