Skip to content

Instantly share code, notes, and snippets.

View tylerjl's full-sized avatar
💭
destroy all computers

Tyler Langlois tylerjl

💭
destroy all computers
View GitHub Profile
@w33ble
w33ble / 1-instructions_1.8.md
Last active August 29, 2015 14:17
Minecraft Mods
# jekyll-readtime
# 2015 Ron Scott-Adams, Licensed under MIT:
# https://tldrlegal.com/license/mit-license
# Original work: https://gist.github.com/zachleat/5792681
# Outputs the estimated time the average person might take to read the content.
# 200 is a round figure based on estimates gathered from various studies.
# http://www.ncbi.nlm.nih.gov/pubmed/18802819
# Usage: {{ page.content | readtime }}
@aphyr
aphyr / zfs-sync
Created February 7, 2015 05:42
Sync ZFS filesystems, incrementally if possible.
#!/usr/bin/env ruby
# Synchronizes ZFS filesystems.
#
# Takes three args: source pool, destination pool, and filesystem name.
#
# Syncs most recent snapshot of filesystem from source to destination pool,
# using incremental transfer if possible.
# Take a snapshot line from zfs list -t snapshot and emit a struct
@skippy
skippy / cloud-config.yml
Created December 31, 2014 18:38
modifying fleet metadata (from aws meta-data service) before fleet.service start; this is a proof of concept (but it works!)
#cloud-config
---
coreos:
units:
- name: update-fleet-metadata.service
command: start
content: |-
[Unit]
Description=Update Fleet metadata tag
Before=fleet.service
@sivel
sivel / better-ssh-authorized-keys-management.md
Last active April 8, 2024 07:53
Better SSH Authorized Keys Management

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server:

@bradoaks
bradoaks / hfsc-shape.sh
Created April 25, 2011 14:51 — forked from eqhmcow/hfsc-shape.sh
HFSC - linux traffic shaping's best kept secret
#!/bin/bash
# As the "bufferbloat" folks have recently re-discovered and/or more widely
# publicized, congestion avoidance algorithms (such as those found in TCP) do
# a great job of allowing network endpoints to negotiate transfer rates that
# maximize a link's bandwidth usage without unduly penalizing any particular
# stream. This allows bulk transfer streams to use the maximum available
# bandwidth without affecting the latency of non-bulk (e.g. interactive)
# streams.
@eqhmcow
eqhmcow / hfsc-shape.sh
Last active August 2, 2023 11:59
HFSC - linux traffic shaping's best kept secret
#!/bin/bash
# As the "bufferbloat" folks have recently re-discovered and/or more widely
# publicized, congestion avoidance algorithms (such as those found in TCP) do
# a great job of allowing network endpoints to negotiate transfer rates that
# maximize a link's bandwidth usage without unduly penalizing any particular
# stream. This allows bulk transfer streams to use the maximum available
# bandwidth without affecting the latency of non-bulk (e.g. interactive)
# streams.