Skip to content

Instantly share code, notes, and snippets.

View sammy8806's full-sized avatar

Steven Tappert sammy8806

View GitHub Profile
@ddrown
ddrown / etc_init.d_iface-colors
Last active November 5, 2016 20:09
Omnia router LED color based on bandwidth usage
#!/bin/sh /etc/rc.common
START=98
USE_PROCD=1
NAME=iface-colors
PROG=/root/iface-colors
start_service() {
procd_open_instance
@Prof9
Prof9 / Readme.md
Last active December 8, 2024 19:24
THIS SCRIPT NO LONGER WORKS! Twitter has rolled out a fix for the web client hack. (Original text: Force enable cramming (280 character tweets) on Twitter. Use TamperMonkey. NOTE: Stops working when you switch pages, refresh to fix.)

As of 7 November 2017 everyone has access to 280 characters in supported clients, so you no longer need this script!

@joyeusenoelle
joyeusenoelle / Mastodon.md
Last active June 16, 2025 11:39
An increasingly less-brief introduction to Mastodon
@j-a4
j-a4 / email_mx_validator.rb
Last active May 25, 2018 19:23
Email MX validator for Mastodon
# Validates that MX record exists for domain to prevent typos and also block by MX servers
# Use by adding to app/models/user.rb
# validates_with EmailMXValidator, if: :email_changed?
# frozen_string_literal: true
require 'resolv'
class EmailMXValidator < ActiveModel::Validator
def validate(user)
domain = user.email.split('@', 2).last
mxs = Resolv::DNS.new.getresources(domain, Resolv::DNS::Resource::IN::MX).to_a.map { |e| e.exchange.to_s }
@RulerOf
RulerOf / README.md
Created March 31, 2021 13:44
DNS SRV Records with Terraform

DNS SRV with Terraform (On AWS Route53)

DNS SRV records are a little cryptic. Even when you create them, it's not particularly obvious what the information in the SRV record actaully means.

When creating the records with Terraform, you can for_each the resource to supply one or more maps that contain better descriptors of the SRV record's constituent components. See the example in the terraform snippet below. Refer here for a longer explanation.