Skip to content

Instantly share code, notes, and snippets.

{
"percentDifference": null,
"quoteResponse": {
"contextSlot": 256843874,
"inAmount": "1000000000",
"inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"otherAmountThreshold": "14254443187926",
"outAmount": "14268711899825",
"outputMint": "D8r8XTuCrUhLheWeGXSwC3G92RhASficV3YA7B2XWcLv",
"platformFee": null,
@Cozy19
Cozy19 / youtube-listen.js
Created April 21, 2022 18:07 — forked from szkrd/youtube-listen.js
Listen to a youtube stream in puppeteer (headless chrome/chromium). By default plays Chillcow's channel, works on linux and windows, clicks on all the popup crap.
// first: `npm init -- yes && npm i chalk puppeteer-core`
// then: `node . --help`
const puppeteer = require('puppeteer-core');
const chalk = require('chalk');
// ---
const ifHasParam = (s = '') => process.argv.includes(s);
const paramValueOf = (s = '') => (process.argv.find(x => x.startsWith(`${s}=`)) || '').split('=')[1];
const DEFAULT_VIDEO_ID = '5qap5aO4i9A'; // ChillCow; his other channel is "DWcJFNfaw9c"
const DEBUG = ifHasParam('--debug');
const SHOW_HEAD = ifHasParam('--head');
@Cozy19
Cozy19 / ffmpegtips.txt
Created March 7, 2021 19:43 — forked from rabssm/ffmpegtips.txt
ffmpeg tips
# Interpolate video frames for a higher frame rate
ffmpeg -i source.mp4 -filter:v minterpolate -r 25 result.mp4
ffmpeg -i source.mp4 -vf minterpolate=50,tblend=all_mode=average,framestep=2 result.mp4
# Crop a video to the bottom right quarter
ffmpeg -i in.mp4 -filter:v "crop=in_w/2:in_h/2:in_w/2:in_h/2" -c:a copy out.mp4
# Resize a video to half size
ffmpeg -i input.mkv -filter_complex "scale=in_w/2:in_h/2" output.mkv