Skip to content

Instantly share code, notes, and snippets.

@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);
@daz
daz / homebridge-lifx.sh
Last active June 30, 2017 07:56
LIFX with Homebridge on macOS
sudo npm uninstall -g homebridge
sudo npm uninstall -g homebridge-lifx-lan
sudo npm install -g --unsafe-perm homebridge
sudo npm install -g homebridge-lifx-lan
cat << 'JSON' > ~/.homebridge/config.json
{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
@daz
daz / telstra-ringer-extender.md
Last active May 30, 2016 06:09
Extending ringer time on Telstra

Custom ringer length on Telstra

Dial:

**61*101**[seconds in 5s increments]#

And press call

Example