Skip to content

Instantly share code, notes, and snippets.

Avatar

Darren Jeacocke daz

View GitHub Profile
@daz
daz / airdata-flights.js
Created Oct 23, 2020
Download all Airdata flights
View airdata-flights.js
// Get a list of all Airdata flight download URLs in KML, GPX, CSV, original format.
// Go to https://app.airdata.com/flight/last and paste this into the console
let urlList = $("#item_list_dt")
.DataTable()
.tables()
.context[0].aoData.map(a => {
return a._aData.h;
})
.slice(1, -1)
@daz
daz / RightClick.applescript
Created Aug 23, 2020 — forked from vitorgalvao/RightClick.applescript
Make right-clicking on OSX accessible via a keyboard shortcut.
View RightClick.applescript
(*
Even though a [native solution][1] exists, it still suffers from a big flaw: it right-clicks the place you cursor is, not what you’re selecting. This addresses that limitation.
You can install this as a [Finder Service, and later asign it a keyboard shortcut][2].
[1]: http://stackoverflow.com/questions/9171613/right-click-shortcut-for-mac-lion-os
[2]: http://www.macosxautomation.com/services/learn/tut01/index.html
*)
@daz
daz / gulpfile.js
Last active Nov 23, 2019
Gulpfile to minify single HTML, CSS, JS file, make it a C++ string, and inject it into a C++ file. Handy for Arduino/ESP projects
View gulpfile.js
const gulp = require("gulp");
const gutil = require("gulp-util");
const inject = require("gulp-inject");
const htmlMin = require("gulp-htmlmin");
const cssMinifyOptions = true;
const jsMinifyOptions = {
mangle: {
toplevel: true
},
@daz
daz / reduce_faces.py
Created Oct 31, 2019 — forked from tylerlindell/reduce_faces.py
script for reducing faces programmatically with Meshlab's api
View reduce_faces.py
#!/usr/bin/env python
import sys
import os
import subprocess
# Script taken from doing the needed operation
# (Filters > Remeshing, Simplification and Reconstruction >
# Quadric Edge Collapse Decimation, with parameters:
# 0.9 percentage reduction (10%), 0.3 Quality threshold (70%)
@daz
daz / QuestCast
Created Jul 1, 2019
Cast Oculus Quest to Mac over wifi
View QuestCast
#!/bin/sh
echo
echo "Connect Quest and hit <return> to continue..."
read Z
echo
QUEST_IP=`adb shell ip route | grep 'proto kernel' | awk '{print \$9}'`
adb tcpip 5555
@daz
daz / gist:aa6fcb5b048af885be90a2143f9d7630
Created Jun 2, 2019
Working M600 firmware May 2019
View gist:aa6fcb5b048af885be90a2143f9d7630
Matrice 600 Pro:
Fw DJI M600P - v.1.00.01.67 (2019.02)
Fw DJI LighBridge (Air System) - 1.1.60
Remote Controller:
DJI GO app - 3.1.50
Fw Lightbridge2 - 1.1.60
Remote Controller - 1.2.10
@daz
daz / clean_usb.sh
Created Apr 26, 2019
Clean macOS dotfiles from a USB
View clean_usb.sh
# Remove invisible dotfiles from a directory or USB drive
# Usage:
# cd /Volumes/MY_USB
# clean_usb.sh
dot_clean $(pwd)
rm -rf .fseventsd
rm -rf .TemporaryItems
@daz
daz / liblas.rb
Created Apr 26, 2019
LibLas with LasZip homebrew
View liblas.rb
class Liblas < Formula
desc "C/C++ library for reading and writing the LAS LiDAR format"
homepage "https://liblas.org/"
url "https://download.osgeo.org/liblas/libLAS-1.8.1.tar.bz2"
sha256 "9adb4a98c63b461ed2bc82e214ae522cbd809cff578f28511122efe6c7ea4e76"
revision 1
head "https://github.com/libLAS/libLAS.git"
bottle do
rebuild 1
@daz
daz / google-earth-studio-ffmpeg.sh
Created Jan 23, 2019
Google Earth Studio stitch image sequence with FFmpeg
View google-earth-studio-ffmpeg.sh
ffmpeg -framerate 30 -pattern_type glob -i '*.jpeg' -c:v libx264 -pix_fmt yuv420p output.mp4
View led-breathe.cpp
uint8_t breathBrightness = (exp(sin(millis() / (float)breathRate * PI)) - 0.36787944) * 108.0;
uint8_t brightness = constrain(map(breathBrightness, 0, 250, 80, 255), 0, 255);
leds[0] = CHSV(hue, 255, brightness);
You can’t perform that action at this time.