Skip to content

Instantly share code, notes, and snippets.

View psenough's full-sized avatar

Filipe Cruz psenough

View GitHub Profile
@psenough
psenough / test-gyro.html
Created May 30, 2018 09:21
gyroscope test page for mobile browsers
<DOCTYPE html>
<html>
<head>
<script>
function init() {
//Find our div containers in the DOM
var dataContainerOrientation = document.getElementById('dataContainerOrientation');
var dataContainerMotion = document.getElementById('dataContainerMotion');
//Check for support for DeviceOrientation event
@psenough
psenough / gist:a42d639aa202bb7ed9e41116f466b986
Last active August 9, 2018 13:02
few random shadertoy plasma tests
void mainImage( out vec4 O, vec2 U )
{
U *= 1./iResolution.xy;
if ((0.5*cos(iTime*5.0+U.x) - U.y+ 0.5) > 0.0) {
O = texture( iChannel0, U);
} else if ((0.5*cos(iTime*2.0+U.y) - U.x+ 0.5) > 0.0){
O = texture( iChannel1, U);
} else {
O = texture( iChannel2, U);
@psenough
psenough / wavs_to_mp3.bat
Created August 22, 2018 04:07
batch script to convert all wavs in a directory to 44.1 320kbps mp3s using ffmpeg
@ECHO OFF
FOR %%f IN (*.wav) DO (
echo Converting: %%f
ffmpeg -i "%%f" -ar 44100 -ab 320k -map_metadata 0 "%%~nf.mp3"
)
echo Finished
PAUSE
@psenough
psenough / wavs_to_mp3_no_metadata.bat
Created August 23, 2018 14:13
batch script to convert all wavs in a directory to 44.1 320kbps mp3s without metadata using ffmpeg
@ECHO OFF
FOR %%f IN (*.wav) DO (
echo Converting: %%f
ffmpeg -i "%%f" -ar 44100 -ab 320k -map_metadata -1 "%%~nf.mp3"
)
echo Finished
PAUSE
@psenough
psenough / wavs_to_flac.bat
Created August 23, 2018 22:58
reencode all wavs in diretory to flac using ffmpeg
@ECHO OFF
FOR %%f IN (*.wav) DO (
echo Converting: %%f
ffmpeg -i "%%f" -ar 44100 -map_metadata -1 "%%~nf.flac"
)
echo Finished
PAUSE
@psenough
psenough / video_from_mp3s.bat
Last active January 15, 2019 15:02
batch script to use ffmpeg to concat all mp3s in the directory and create a video using 00_1425.jpg single frame image as visuals
(for %%i in (*.mp3) do @echo file '%%i') > temp_list.txt
ffmpeg -f concat -i temp_list.txt -c copy temp_audio.wav
del temp_list.txt
ffmpeg -loop 1 -i 00_1425.jpg -i temp_audio.wav -shortest -vf scale=-2:480 video.mp4
del temp_audio.wav
node "C:\Users\Filipe Cruz\Documents\tracklist_from_directory_with_mp3s\app.js" "%cd%\\" >> temp_tracklist.txt
pause
@psenough
psenough / index.html
Created May 15, 2019 16:38
device orientation and motion detection test page
<DOCTYPE html>
<html>
<head>
<script>
function init() {
//Find our div containers in the DOM
var dataContainerOrientation = document.getElementById('dataContainerOrientation');
var dataContainerMotion = document.getElementById('dataContainerMotion');
//Check for support for DeviceOrientation event
@psenough
psenough / shorts_60.bat
Created February 22, 2021 01:30
Batch Script to overlay mp3 id3 info and artwork cover into an animated video background in the format of youtube shorts
@ECHO OFF
REM %1 video background in 1920x1080
REM SET video="C:\Users\Filipe Cruz\Videos\wrighter\2021-02-20 23-13-44.mov"
REM SET video = %1
REM %1 video background already rotated into 1080x1920
SET videorot="C:\Users\Filipe Cruz\Videos\wrighter\rot_2021-02-21 22-53-37.mp4"
REM SET videorot = %1
REM %2 cover artwork in squared form (any res above what we use)
@psenough
psenough / demozoo_original_screenshots.js
Created December 1, 2022 23:36
Tampermonkey userscript to display the original (bigger) screenshots on demozoo parties while mouseover entries
// ==UserScript==
// @name Demozoo Original Screenshots
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://demozoo.org/parties/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=demozoo.org
// @grant none
// ==/UserScript==
@psenough
psenough / pouet_screenshots.js
Last active June 29, 2023 16:49
Tampermonkey userscript to show the screenshots on mouseenter of prod links on toplists.php and party.php
// ==UserScript==
// @name Pouet Screenshots
// @namespace http://tampermonkey.net/
// @version 0.3
// @description try to take over the world!
// @author You
// @match https://pouet.net/toplist.php*
// @match https://www.pouet.net/toplist.php*
// @match https://pouet.net/party.php*
// @match https://www.pouet.net/party.php*