Skip to content

Instantly share code, notes, and snippets.

View kizzard's full-sized avatar

Jeremy Blencowe kizzard

  • Index Exchange
  • Los Angeles
View GitHub Profile
@kizzard
kizzard / youtubeViewsPerDay.js
Last active February 23, 2019 03:30
Show the views per day of youtube videos on a channel (normalized popularity rating)
document.querySelectorAll('div#metadata-line').forEach(e => {
if (/\/d/.exec(e.innerHTML)) return;
vk = /(\d+\.?\d?)K views/.exec(e.innerHTML);
vk = vk ? vk[1] : 0;
v = /\d+(\.\d)? view/.exec(e.innerHTML);
v = v ? v[1] : (vk ? vk * 1000 : 0);
y = /(\d) year/.exec(e.innerHTML);
y = y ? y[1] : 0;
m = /(\d) month/.exec(e.innerHTML);
m = m ? m[1] : 0;
@kizzard
kizzard / farmingSimulatorCameraFix.py
Last active November 25, 2018 08:22
Automatic patch tool to correct bad head tracking camera planes in Farming Simulator 19.
# Automatic patch tool to correct bad head tracking camera planes in Farming Simulator 19.
# The tool scans for X rotation values in indoor camera nodes in i3d files and sets them to 0.
#
# Change "rootPath" to your game install directory + "data\\vehicles"
#
# * Run with "python farmingSimulatorCameraFix.py patch"
# * Undo with "python farmingSimulatorCameraFix.py restore"
#
# Notes:
# * Doesn't fix mods - only original vehicles