Skip to content

Instantly share code, notes, and snippets.

@daz
daz / DataShipper.cs
Created February 27, 2018 13:48 — forked from trishume/DataShipper.cs
Tobii EyeX UDP data shipper to VMWare VM host.
// Used to send data from a VMWare VM running the EyeX software
// with a Steelseries Sentry to a Mac OSX host over UDP.
namespace MinimalGazeDataStream
{
using EyeXFramework;
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
using Tobii.EyeX.Framework;
require 'geo/coord'
EXIFTOOL_DMS_REGEX = %r{
^(?<latd>\d+)\sdeg\s
(?<latm>\d+)'\s
(?<lats>(\d+\.\d+))"\s
(?<lath>N|S),\s
(?<lngd>\d+)\sdeg\s
(?<lngm>\d+)'\s
(?<lngs>(\d+\.\d+))"\s
@daz
daz / h100-show-previews.js
Created January 12, 2018 03:10
triplej Hottest 100 show all preview buttons bookmarklet
javascript:(function()%7B%24('.track__buttons__play').css('opacity'%2C1)%7D)()
@daz
daz / youtube-dl-to-mp3.sh
Last active August 17, 2024 08:01
youtube-dl pipe to ffmpeg for mp3 output one-liner
youtube-dl -f251 "[URL]" -o - | ffmpeg -i pipe: -strict -2 out.mp3
@daz
daz / generate-silence.sh
Created October 23, 2017 07:25
Generate a silent AAC audio with ffmpeg
ffmpeg -f lavfi -i anullsrc=r=11025:cl=mono -t <number of seconds> -acodec aac out.m4a
@daz
daz / hikvision-to-mp4.sh
Last active September 20, 2024 10:06
Hikvision NVR native MP4 export to QuickTime compatible for FCPX
for i in *.mp4; do ffmpeg -i "$i" -c:v copy "_${i%.mp4}.mp4"; done
@daz
daz / FLIRjpg2HDF5.py
Created September 23, 2017 07:20 — forked from gilgeorges/FLIRjpg2HDF5.py
Extracts the raw thermal images from a set / sequence of FLIR JPG images and stores them as matrices in an HDF5 file. The actual extraction is done using Exiftool (available at http://www.sno.phy.queensu.ca/~phil/exiftool/ - may require you to install Perl, e.g. "Strawberryperl" for Windows).
""" FLIRjpg2HDF5
reads raw thermal images from a FLIR-camera JPG image series
and stores them in a HDF5 file - using exiftool """
import glob
import os
import subprocess
import PIL.Image
import numpy as np
@daz
daz / FLIR.pm
Created September 22, 2017 08:38 — forked from mauricebaruk/FLIR.pm
Exiftool FLIR.pm
#------------------------------------------------------------------------------
# File: FLIR.pm
#
# Description: Read FLIR meta information
#
# Revisions: 2013/03/28 - P. Harvey Created
#
# References: 1) http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,4898.0.html
# 2) http://www.nuage.ch/site/flir-i7-some-analysis/
# 3) http://www.workswell.cz/manuals/flir/hardware/A3xx_and_A6xx_models/Streaming_format_ThermoVision.pdf
@daz
daz / tumblr-mass-editor.selector.js
Created February 28, 2017 06:15
Tumblr Mass Post Editor selector
highlighted = $('.highlighted');
for (var i = 0; i < highlighted.length; i++) {
highlighted[i].remove();
}
photos = $('.photo');
for (var i = 0; i < 100; i++) {
photos[i].className = photos[i].className + ' highlighted';
}
@daz
daz / sd-card.ino
Last active February 28, 2017 08:16
Arduino UNO Data Logger Shield example
// This isn't needed with official Arduino app
#include <SPI.h>
#include <SD.h>
File file;
void setup() {
Serial.begin(9600);
delay(50);