Skip to content

Instantly share code, notes, and snippets.

View opensiriusfox's full-sized avatar
📡
CQ'ing for Space

Luke opensiriusfox

📡
CQ'ing for Space
  • Greater Seattle Area
View GitHub Profile
@opensiriusfox
opensiriusfox / omxplayer-native_ec4e7bc41d_lrenaud.patch
Created July 27, 2012 02:08
OMXPlayer Patch to enable Native Raspberry Pi Builds (Jul 26 2012) [FOR ec4e7bc41d6d2f2c6ace48a0752bf82756f4ff40]
diff -rupN Makefile Makefile
--- Makefile 2012-07-26 14:20:21.179058001 -0700
+++ Makefile 2012-07-26 14:45:18.667563466 -0700
@@ -1,6 +1,6 @@
include Makefile.include
-CFLAGS+=-DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST -Wno-psabi -I$(SDKSTAGE)/opt/vc/include/
+CFLAGS+=-DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODE
@opensiriusfox
opensiriusfox / omxplayer-native_105837c797_lrenaud.patch
Created July 27, 2012 22:06
OMXPlayer Patch to enable Native Raspberry Pi Builds (Jul 27 2012) [FOR 105837c7971bd82a031efe3da2b58873ff0a1ed7]
diff -ru Makefile Makefile
--- Makefile 2012-07-27 13:41:32.149454618 -0700
+++ Makefile 2012-07-27 13:42:17.221419499 -0700
@@ -1,6 +1,6 @@
include Makefile.include
-CFLAGS+=-DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST -Wno-psabi -I$(SDKSTAGE)/opt/vc/include/
+CFLAGS+=-DSTANDALONE -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG -DHAVE_LIBAVCODEC_
@opensiriusfox
opensiriusfox / omxplayer-native_ec7ac68_lrenaud.patch
Created December 13, 2012 07:32
OMXPlayer Patch to enable Native Raspberry Pi Builds (Dec 12 2012) [For ec7ac68fa65eabcb491684d371899673cae93fbf] (Note: My Pi is out of commission for a short while, so this patch is untested. If it fails you should know almost immediately. Let me know if it fails for you and I'll get it fixed.)
diff -rupN Makefile.ffmpeg Makefile.ffmpeg
--- Makefile.ffmpeg 2012-12-12 23:20:04.000000000 -0800
+++ Makefile.ffmpeg 2012-12-12 23:22:48.000000000 -0800
@@ -8,11 +8,11 @@ all: checkout configure compile
copy:
find ffmpeg -name '*.so*' -exec cp {} . \;
- $(HOST)-strip *.so*
+ strip *.so*
@opensiriusfox
opensiriusfox / waitdone.sh
Last active June 2, 2018 22:31
waitdone - A simple bash script to sleep until another proccess is done.
#!/bin/bash
# waitdone
###############################################################################
# A simple bash script to sleep until another process is done. This is handy
# if you have an executable running in another tab/session/etc and want to
# automatically run a dependent command when the first finishes, or if you
# want to queue up another command that will make use of the same system
# resources being locked by the currently executing process.
###############################################################################
# VERSION HISTORY
@opensiriusfox
opensiriusfox / .cshrc
Created June 19, 2018 23:29
A .cshrc that chainloads to /bin/bash unless csh is explicitly needed
#!/bin/csh
# Override default login C shell to use bash, unless we explicitly call
# the shell. This allows it to be used if truly desired.
if ($SHELL != "/bin/bash") then
if ($?prompt) then
setenv SHELL /bin/bash
exec $SHELL
endif
exit
endif
set(groot,'defaultAxesFontName','Proxima Nova Rg');
set(groot,'defaultPolaraxesFontName','Proxima Nova Rg');
set(groot,'defaultLegendFontName','Proxima Nova Rg');
set(groot,'defaultTextFontName','Proxima Nova Rg');
set(groot,'defaultTextarrowshapeFontName','Proxima Nova Rg');
set(groot,'defaultTextboxshapeFontName','Proxima Nova Rg');
set(groot,'defaultLegendBox','off')
%set(groot,'defaultLegendLocation','best')
@opensiriusfox
opensiriusfox / LPRPlotDefs.py
Created April 13, 2020 00:34
My dissertation/paper matplotlib tinkering scripts
#!/usr/bin/env python3
################################################################################
# Define the prefered plotting defaults.
# These generally translate to how I want stuff to show up in IEEE papers.
# Note that when I do my debugging, I override figure.figsize in my testing
# enviornment.
################################################################################
import matplotlib
import matplotlib.font_manager as FM
@opensiriusfox
opensiriusfox / tmux.conf
Created August 27, 2020 19:58
core tmux.conf
set-option -g mouse on
set-window-option -g mode-keys vi
bind r source-file ~/.tmux.conf \; display "reloaded ~/.tmux.conf"
bind \" split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
#set -g @ttm-window-mode vertical
@opensiriusfox
opensiriusfox / obfuscate.py
Created May 16, 2021 03:01
A little utility ot obfuscate strings with unicode.
#!/usr/bin/env python3
import click
from random import randint
from random import random
####################################################
##### Example Execution
# $ pip3 install click
# $ chmod +x ./obfuscate.py
@opensiriusfox
opensiriusfox / bash-5-bug.sh
Last active June 10, 2021 15:00
A script to reproduce a regression from Bash 4.4 to 5.0
#!/bin/bash
echo "====="
echo "== Test #1"
echo "== Working in bash 4, broken in bash 5"
echo "====="
# Test Case 1
startTime=$(date +"%s")
recheckSleepTime=0.2