Skip to content

Instantly share code, notes, and snippets.

View raltamirano's full-sized avatar

Rodrigo Altamirano raltamirano

View GitHub Profile
@raltamirano
raltamirano / reanimate.py
Last active May 25, 2020 22:24
Creates a video that smoothly scrolls between a series of images
import os
import glob
import random
source_dir = './frames/background'
overlay_dir_1 = './frames/stroller'
overlay_dir_2 = './frames/flying-things'
output_dir = source_dir + '/out'
slices_per_frame = 10
@raltamirano
raltamirano / audio-image-video.sh
Last active December 16, 2019 23:06
Combine an audio file with an image into a video
#! /bin/bash
# Combine an audio file with an image into a video.
#
# Input:
# - Audio file: render.wav
# - Image file: cover.png
#
# Output:
# - Video file: output.mp4
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>WebMidi Test 1</title>
<script type="text/javascript">
navigator.requestMIDIAccess()
.then(function(access) {
window.ma = access
@raltamirano
raltamirano / jstack-analyzer.awk
Created June 21, 2013 23:52
This awk script is aimed at analyzing jstack output data to help find lock contention, hot locks and the like in Java apps. Just pipe jstack to awk running this script and take a look at the output.
# -----------------------------------------------------------------------------
# This awk script is aimed at analyzing jstack output data to help find lock
# contention, hot locks and the like in Java apps.
# Just pipe jstack to awk running this script and take a look at the output.
#
# Author: Rodrigo Altamirano (rodrigo.altamirano@gmail.com)
# -----------------------------------------------------------------------------
# Initializing and configuring...