Skip to content

Instantly share code, notes, and snippets.

View gravyboat's full-sized avatar

Forrest gravyboat

View GitHub Profile
@stevenringo
stevenringo / reinvent-2017-youtube.md
Created December 3, 2017 23:01
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

@potatoqualitee
potatoqualitee / no-bright-blue-github.css
Last active March 2, 2017 02:04
Stylebot CSS for the good ol' gentle blue colors of GitHub
h1.public strong a {
color: #4078C0;
}
a.subnav-item.js-subnav-item.selected {
background-color: #4078C0;
}
svg.octicon.octicon-file-directory path {
color: #4078C0;
#!/bin/bash
#
# Compare two PDF files.
# Dependencies:
# - pdfinfo (xpdf)
# - pdfjam (texlive-extra-utils)
# - diffpdf
#
MAX_HEIGHT=15840 #The maximum height of a page (in points), limited by pdfjam.
@arubis
arubis / _etc_salt_cloud.profiles
Last active November 13, 2023 20:22
Salt doesn't see individual values in 'roles' grain
base_ec2_private:
provider: my-ec2-us-east-private-ips
image: ami-018c9568
size: Micro Instance
ssh_username: ubuntu
base_ec2_public:
provider: my-ec2-us-east-public-ips
image: ami-018c9568
size: Micro Instance
@UtahDave
UtahDave / top.sls
Created August 5, 2014 18:08
Auto include minion specific sls file
### top.sls (more tweaks)
dev:
'*':
- nodes.{{ grains['id' }}
base:
'*':
- nodes.{{ grains['id' }}
{% set a = 'world' %}
{% set b = 'hello-{test}' %}
test:
file.touch:
- name: /tmp/{{ b.format(test=a) }}
@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@rgbkrk
rgbkrk / logrip.md
Last active August 29, 2015 13:56
Ripping logs from salt minions

Need a rapid way of pulling your logs back using salt? With one config option in /etc/salt/master and two quick commands, you can do this in parallel across your boxes.

First, use archive.tar to tarball up your logs

salt '*' archive.tar cvzf /tmp/logs.tgz /var/log/

Next up, cp.push to pull the logs back from the minions up to the master

In order to use cp.push, you'll need to set file_recv to True within /etc/salt/master.

import logging
try:
import nacl.state
from nacl.auto import *
from nacl.run import run
HAS_NACL = True
except ImportError:
HAS_NACL = False
anonymous
anonymous / repo.cr.internal.sls
Created January 9, 2014 20:43
repo_cr_ots:
git.latest:
- name: ssh://git_user@server/usr/local/git/ots.git
- target: /var/www/ots
- rev: {{ revision }}