Skip to content

Instantly share code, notes, and snippets.

@guillego
guillego / ffmpeg_patch.mk
Created July 5, 2023 08:46
ffmpeg mmal patch
ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
FFMPEG_CONF_OPTS += --enable-omx --enable-omx-rpi \
--extra-cflags=-I$(STAGING_DIR)/usr/include/IL
FFMPEG_DEPENDENCIES += rpi-userland
ifeq ($(BR2_arm),y)
# MMAL only available on 32-bit ARM
FFMPEG_CONF_OPTS += --enable-mmal
else
FFMPEG_CONF_OPTS += --disable-mmal
@guillego
guillego / install-erlang.sh
Last active June 9, 2023 14:46
Install erlang with asdf in Apple silicon
#! /bin/bash
export ERLANG_VERSION=26.0.1
export KERL_CONFIGURE_OPTIONS="--disable-debug --disable-silent-rules --without-javac --enable-shared-zlib --enable-dynamic-ssl-lib --enable-threads --enable-kernel-poll --enable-wx --enable-webview --enable-darwin-64bit --enable-gettimeofday-as-os-system-time --with-ssl=/opt/homebrew/opt/openssl@3"
asdf install erlang ${ERLANG_VERSION}

Keybase proof

I hereby claim:

  • I am guillego on github.
  • I am guillego (https://keybase.io/guillego) on keybase.
  • I have a public key whose fingerprint is FED3 C046 A959 C367 F5A3 DCC4 FF49 E6DA 8CF4 3F92

To claim this, I am signing this object:

@guillego
guillego / giphy.m
Created February 13, 2018 11:47
Matlab save to gif
% This runs within the for loop that iterates between stages of image
% GIF
drawnow
% Capture the plot as an image
frame = getframe(h);
im = frame2im(frame);
[imind,cm] = rgb2ind(im,256);
% Write to the GIF File
if this_pulse == 1
imwrite(imind,cm,filename,'gif', 'Loopcount',inf);
@guillego
guillego / launcher.sh
Created February 13, 2018 11:46
Create Launcher Desktop Linux
gnome-desktop-item-edit --create-new ~/Desktop
@guillego
guillego / maximize.m
Created January 29, 2018 14:29
maximize plot MATLAB
set(gcf, 'Position', get(0, 'Screensize'));
@guillego
guillego / gist:8a5b24d62763c4bcd7789790b8b0e9a6
Created January 23, 2018 16:31 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>