Skip to content

Instantly share code, notes, and snippets.

@phanan
phanan / runner.js
Last active May 8, 2024 08:44
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;
@ghedo
ghedo / 60fps.py
Last active November 15, 2021 19:31
VapourSynth script to convert videos to 60fps (with mpv)
# Usage: mpv --vf=vapoursynth=60fps.py --hwdec=no <file>
import vapoursynth as vs
core = vs.get_core()
src_fps = 24
dst_fps = 60
clip = core.std.AssumeFPS(video_in, fpsnum=src_fps)
super = core.mv.Super(clip, pel=2)
@RichardWithnell
RichardWithnell / RPi
Last active August 2, 2017 20:56
MPTCP Raspberry Pi
git clone http://github.com/richardwithnell/mptcp-rpi
make mrproper
# 64 Bit
# export CCPREFIX=/home/richard/Software/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-
# 32 Bit
export CCPREFIX=/home/richard/Software/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-
make ARCH=arm CROSS_COMPILE=$CCPREFIX bcmrpi_defconfig
make ARCH=arm CROSS_COMPILE=$CCPREFIX menuconfig
make -j3 ARCH=arm CROSS_COMPILE=$CCPREFIX
@pkulak
pkulak / climate.rb
Last active January 21, 2020 23:57
A quick script to turn on your Audi A3 E Tron's climate control remotely.
#!/usr/bin/env ruby
require 'unirest'
# Set these by going to etron.audiusa.com/web/aucwp/login once by hand and figuring them out
EMAIL = "me@example.com"
PASSWORD = "password"
ACCOUNT = 9999
PIN = 9999