View gif_this.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
import os | |
from pathlib import Path | |
import argparse | |
import subprocess | |
def _gif_this(source_file, output, start_time, end_time, duration, fps, scale): | |
""" | |
http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html |
View gist:de39f9cce1afc6e65c144b1fbcc28461
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==| 2021-08-13 @ 10:00 |== | |
Pacific/Midway | |
Pacific/Niue | |
Pacific/Pago_Pago | |
Pacific/Samoa | |
US/Samoa | |
==| 2021-08-13 @ 11:00 |== | |
Pacific/Honolulu | |
Pacific/Johnston | |
Pacific/Rarotonga |
View shader.glsl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 410 core | |
uniform float fGlobalTime; // in seconds | |
uniform vec2 v2Resolution; // viewport resolution (in pixels) | |
uniform float fFrameTime; // duration of the last frame, in seconds | |
uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq | |
uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients | |
uniform sampler1D texFFTIntegrated; // this is continually increasing | |
uniform sampler2D texPreviousFrame; // screenshot of the previous frame |
View generate_texture_from_image.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a texture that concat profile | |
mogrify -resize 512x512! *.png ; montage -mode concatenate -tile x1 *.png ../tex1.jpg |
View youtube_chapter.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -x | |
#Download media + metadata | |
youtube-dl --write-info-json -x --audio-format mp3 -o "tmp_out.%(ext)s" $1 | |
# Maybe a way to get the file name from previous function | |
INFO="tmp_out.info.json" | |
AUDIO="tmp_out.mp3" | |
echo :: $INFO $AUDIO :: |
View kata-starwars.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Generation of files ## | |
cat > movies.txt <<EOL | |
A New Hope (1977) | |
The Empire Strikes Back (1980) | |
Return of the Jedi (1983) | |
The Phantom Menace (1999) | |
Attack of the Clones (2002) | |
Revenge of the Sith (2005) | |
The Force Awakens (2015) |
View demo.shader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 150 | |
in VertexData | |
{ | |
vec4 v_position; | |
vec3 v_normal; | |
vec2 v_texcoord; | |
} inData; | |
out vec4 fragColor; |
View gist:da60e73576de5f453b8dadb2d8e63f4a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# crontab -l | |
59 09 * * 1-5 export DISPLAY=:0.0 && /usr/bin/play.sh | |
# ^---------- better to wrap the command to a script | |
# ^------make it launchable without display / terminal | |
# | |
# /usr/bin/play.sh | |
#!/bin/bash | |
/usr/bin/mplayer -vo null -vc dummy -really-quiet -volume 75 -loop 2 "$(ls /home/totetmatt/Music/JRMelody/* | shuf | head -n 1)" > /dev/null 2>&1 |
View gist:5d4e92406637ab8b2ec683c7e738a26f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version 150 | |
in VertexData | |
{ | |
vec4 v_position; | |
vec3 v_normal; | |
vec2 v_texcoord; | |
} inData; | |
out vec4 fragColor; |
View yougif.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $1 = Video URL | |
# $2 = Time to start (format 00:00:00) | |
# $3 = Duration of sample (format 00:00:00) | |
# $4 = Output file | |
youtube-dl -f mp4 \ | |
$1 \ | |
-o - \ | |
| ffmpeg -i pipe: \ | |
-ss $2 \ | |
-t $3 \ |
NewerOlder