Skip to content

Instantly share code, notes, and snippets.

View reid's full-sized avatar

Reid Burke reid

View GitHub Profile
# WARNING: DO NOT RUN THIS AS A SCRIPT, RUN THE COMMANDS MANUALLY
# Make rootfs persistent (yes, this command must be run twice)
fw_setenv bootcmd "run ubi_init; run flash_flash"
fw_setenv bootcmd "run ubi_init; run flash_flash"
# Confirm the change:
strings /dev/mtd1 | grep bootcmd
strings /dev/mtd2 | grep bootcmd
require "open-uri"
r = -> { URI(_1).read }
post_dates = r.("https://daringfireball.net/archive/")
.scan(%r{<small>(.+?)</small>})
.map { |(x)| Date.parse(x.gsub("&nbsp;", " ")) }
link_dates = r.("https://daringfireball.net/linked/")
.scan(%r{href="(.+?/linked/20\d\d/.+?)"})
@dcode
dcode / howto_grandstream_device_to_unifi_talk.md
Created November 30, 2021 15:23
How to setup a Grandstream phone as a device on UniFi Talk

How to setup Grandstream DP750 for Unifi Talk

I've seen several posts on Reddit and other forums that say "oh you can use a grandstream phone with UniFi Talk and it's flawless". Unfortunately, I am not a VoIP engineer so it was not intuitive to me, but I got it to work. Here's how.

For this writeup, I'm using a Grandstream DP750 DECT base with a DP720 DECT wireless handset. I really wanted a wireless phone for general use in my house, but Ubiquiti doesn't make one, so I wanted to find a way. My goal is to setup UniFi Talk for my home phone solution and share a single phone number with a UniFi wired phone that sits on my office desk. As far as I know, you have to get a UniFi phone to do the initial Talk setup (though, in my tinkering, I noticed it's using a PostgreSQL database, you could probably bypass the initial setup if you knew what you were doing). I'm also using a UDM-Pro for my gateway.

Assuming your UDM-Pro management interface is on 192.168.1.1, your base station should be assigned an IP on a VL

@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
#################################################################
# #
# Binary Sensors #
# #
#################################################################
binary_sensor:
- platform: mqtt
name: Sprinkler Watering
state_topic: "bhyve/message"
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active June 28, 2024 17:15
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@matellis
matellis / things3-to-of3.applescript
Last active January 31, 2024 18:53 — forked from cdzombak/things-to-of.applescript
Script to import from Things 3 into Omnifocus 3
--------------------------------------------------
--------------------------------------------------
-- Import tasks from Things to OmniFocus
--------------------------------------------------
--------------------------------------------------
--
-- Script taken from: http://forums.omnigroup.com/showthread.php?t=14846&page=2 && https://gist.github.com/cdzombak/11265615
-- Added: OF3 & Things 3 compatibility; task order; areas/folders; tags
-- Empty your Things Trash first.
--
@deptno
deptno / strong-typed-redux-action.ts
Last active April 22, 2020 17:46
strong typed redux action with typescript@2.8
function createAction<A extends ActionTypes>(type: A): TypedAction<A>
function createAction<A extends ActionTypes, P>(type: A, payload: P): TypePayloadAction<A, P>
function createAction(type, payload?) {
return payload !== undefined ? {type, payload} : {type}
}
enum ActionTypes {
ACTION_1 = 'action 1',
ACTION_2 = 'action 2'
}
@G33kDude
G33kDude / mjpeg.py
Last active January 5, 2023 11:19
Stream a webcam over HTTP using the MJPEG protocol
#!/usr/bin/env python2
import time
# HTTP
import BaseHTTPServer
import SimpleHTTPServer
import SocketServer
import threading
@tpae
tpae / Trie.js
Created November 20, 2016 23:49
Trie.js - super simple JavaScript implementation
// Trie.js - super simple JS implementation
// https://en.wikipedia.org/wiki/Trie
// -----------------------------------------
// we start with the TrieNode
function TrieNode(key) {
// the "key" value will be the character in sequence
this.key = key;