Skip to content

Instantly share code, notes, and snippets.

Colin Bendell colinbendell

Block or report user

Report or block colinbendell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
colinbendell / snowflake-r
Last active Mar 30, 2018
simple query in R backing against snowflake
View snowflake-r
options(dplyr.jdbc.classpath = "~/Downloads/snowflake-jdbc-3.5.3.jar")
# Update with credentials
snowflake_db <- src_snowflakedb(user = ""password = "", account = "ab123456", region = "us-east-1", opts = list(warehouse = "import", db = "cloudinary", schema = "public"))
benchmarks <- tbl(snowflake_db, in_schema("cto","lossy_benchmark_fast_v1_1"))
colinbendell /
Created Dec 4, 2017
Simple mass conversion of GIF to MP4 (h264/h265), WebM (vp8/vp9) and WebP
curl '' -o gipyurls.json
jq .[].gifs[].images.original.url gipyurls.json |cut -d / -f 5 | parallel -j 20 --gnu curl{}/giphy.gif -o {}.gif
parallel -j 20 --gnu "ffmpeg -f gif -i {} {}.h264.mp4" ::: *.gif
parallel -j 20 --gnu "ffmpeg -f gif -i {} -c:v libx265 {}.h265.mp4" ::: *.gif
parallel -j 20 --gnu "ffmpeg -f gif -i {} -c:v libvpx {}.vp8.webm" ::: *.gif
parallel -j 20 --gnu "ffmpeg -f gif -i {} -c:v libvpx-vp9 {}.vp9.webm" ::: *.gif
colinbendell / imagedata.js
Last active Dec 5, 2017
Extract a set of image information from a webpage
View imagedata.js
let imgData = Array.from(document.getElementsByTagName("img"))
.map(v => {
var rect = v.getBoundingClientRect();
var vHeight = (window.innerHeight || doc.documentElement.clientHeight);
var vWidth = (window.innerWidth || doc.documentElement.clientWidth);
var vDPR = window.devicePixelRatio;
return {
src: v.currentSrc,
cssWidth: v.clientWidth,
naturalWidth: v.naturalWidth,
You can’t perform that action at this time.