Skip to content

Instantly share code, notes, and snippets.

View emorydunn's full-sized avatar

Emory Dunn emorydunn

View GitHub Profile
@emorydunn
emorydunn / keybase.md
Created November 10, 2016 02:09
Keybase

Keybase proof

I hereby claim:

  • I am emorydunn on github.
  • I am emorydunn (https://keybase.io/emorydunn) on keybase.
  • I have a public key ASAyWL46_a-NUmVMFrpwpSWtjTOd7qycH3qQ9GSqHhZt-Ao

To claim this, I am signing this object:

@emorydunn
emorydunn / tinydash.html
Last active October 25, 2021 20:35
A small single screen dashboard for NetData.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tiny Dash</title>
<meta name="application-name" content="netdata">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
@emorydunn
emorydunn / MQTTRotary.ino
Created December 2, 2018 00:45
Use a rotary phone dial connected to an ESP8266 to send MQTT messages.
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
#define wifi_ssid "## SSID ##"
#define wifi_password "## PASSWORD ##"
#define mqtt_server "## SERVER IP ##"
//#define mqtt_user ""
//#define mqtt_password ""
@emorydunn
emorydunn / acme-cert-dump.py
Last active September 26, 2019 18:16 — forked from JayH5/acme-cert-dump.py
Dump certificates from Traefik's acme.json
#!/usr/bin/env python3
import argparse
import base64
import json
import os
import shlex
import subprocess
import sys
@emorydunn
emorydunn / IncrementCounter.swift
Last active April 3, 2019 01:11
Add a counter to a URL
//
// IncrementCounter.swift
//
// Created by Emory Dunn on 2019-04-01.
//
import Foundation
extension URL {
@emorydunn
emorydunn / GPXToGeoJSON.swift
Last active January 8, 2020 02:01
Swift script to Convert GPX files to GeoJSON files for import into Compass
// A Swift script to Convert GPX files to GeoJSON files for import into Compass
// The script takes a single argument, the GPX file, and saves out a matching GeoJSON file
//
// The GeoJSON is meant to be imported into Compass (https://github.com/aaronpk/Compass)
// and thus is not "correct" GeoJSON
import Foundation
/// An object to handle converting a GPX file to GeoJSON
struct GPXtoGeoJSON {
@emorydunn
emorydunn / led_strip_1.yaml
Last active April 11, 2024 12:23
Sonoff L1 ESPHome Component
esphome:
name: led_strip_1
platform: ESP8266
board: esp8285
includes:
- custom_components/sonoff_l1.h
wifi:
@emorydunn
emorydunn / WebSocketTaskPublisher.swift
Last active April 19, 2022 19:36
A publisher that delivers the messages from a WebSocket.
//
// WebSocketTaskPublisher.swift
//
//
// Created by Emory Dunn on 5/23/21.
//
import Foundation
import Combine
@emorydunn
emorydunn / emoji.fish
Created November 16, 2022 18:37
A function to download Slack reaction.
function emoji --description 'Download an Emoji from Slack'
set url $argv
# Download the file
wget -q "$url"
# Parse the URL.
# Last component is the filename on the server
# Second to last is the emoji name in Slack
set urlComponents (string split "/" $url)
@emorydunn
emorydunn / finder_icons.fish
Last active March 16, 2023 21:23 — forked from chockenberry/finder_icons.sh
Fish function to toggle Finder icons
function finder_icons --description 'Script to toggle Finder icons'
defaults read com.apple.finder CreateDesktop > /dev/null 2>&1
set enabled $status
switch $argv[1]
case off
if test $enabled -eq 1
osascript -e 'tell application "Finder" to quit'
defaults write com.apple.finder CreateDesktop false
open -a Finder