Skip to content

Instantly share code, notes, and snippets.

View meatballhat's full-sized avatar
🐻
🎷 🐻

Dan Buch meatballhat

🐻
🎷 🐻
View GitHub Profile
@bradland
bradland / ssh-known-hosts-mgmt.sh
Last active April 4, 2023 21:21
SSH known_hosts tools
# This is a short collection of tools that are useful for managing your
# known_hosts file. In this case, I'm using the '-f' flag to specify the
# global known_hosts file because I'll be adding many deploy users on this
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts
# Add entry for host
ssh-keyscan -H github.com >> /etc/ssh/ssh_known_hosts
# Scan known hosts
ssh-keygen -f /etc/ssh/ssh_known_hosts -F github.com
@romanbsd
romanbsd / gzip.rb
Created October 15, 2012 13:11
Faraday gzip response middleware
require 'faraday'
require 'zlib'
module FaradayMiddleware
class Gzip < Faraday::Response::Middleware
def on_complete(env)
encoding = env[:response_headers]['content-encoding'].to_s.downcase
case encoding
when 'gzip'
@jszwedko
jszwedko / multiprogrammed_batch_processing_system.go
Created February 25, 2013 00:26
Playing around with the ideas from Hoare's "A model for communicating sequential processes" (specifically section 10). Doesn't gracefully quit or do the print spooling thing. Run like: `go run multiprogrammed_batch_processing_system.go -readers 3 -printers 3 -processors 2 -job "3:3" -job "2" -job "1:1:1" -job "4:4:4:4:4:4" -job "5:5"`. See -h fo…
package main
import (
"flag"
"fmt"
"math/rand"
"strings"
"time"
)
@benr
benr / gist:5505198
Created May 2, 2013 20:34
SmartOS Vagrant Box, first preview. Lacks VBox Extensions for disk sharing. (smartos-20130419T073558Z)
vagrant box add smartos http://cuddletech.com/tmp/smartos-latest.box
mkdir smartos && cd smartos
vagrant init smartos
vagrant up
vagrant ssh
@jpetazzo
jpetazzo / Config.in
Last active December 18, 2015 17:38
The smallest PostgreSQL distro in the world! See full instructions at http://blog.docker.io/2013/06/create-light-weight-docker-containers-buildroot
config BR2_PACKAGE_POSTGRES
bool "postgres"
depends on BR2_TOOLCHAIN_BUILDROOT_INET_IPV6
help
PostgresSQL server
comment "postgres requires a toolchain with IPV6 support enabled"
depends on !BR2_TOOLCHAIN_BUILDROOT_INET_IPV6
@atmos
atmos / heaven.md
Last active November 23, 2020 22:35
Response to a dude who asked about heaven. https://github.com/holman/feedback/issues/422

@holman got a request about our deployment system, heaven

I know it's not a high priority, but has there been any activity on open-sourcing the core Heaven gem?

There is. I've been working on extracting the non-GitHub specific parts into two gems. This first is a CLI portion called hades. The second is an HTTP API portion called heaven.

When you open source something previously used as in internal tool like Heaven, Hubot, Boxen, etc., how do you manage and hook in the parts that need to stay internal?

Normally I focus around four questions:

@jakedt
jakedt / gist:7533338
Created November 18, 2013 19:00
An example payload for a Quay.io push webhook.
{
"pushed_image_count": 2,
"name": "ubuntu",
"repository":"devtable/ubuntu",
"docker_url": "quay.io/devtable/ubuntu",
"updated_tags": {
"latest": "b750fe79269d2ec9a3c593ef05b4332b1d1a02a62b4accb2c21d589ff2f5f2dc"
},
"namespace": "devtable",
"visibility": "private",
@bugant
bugant / foo.rb
Last active August 29, 2015 13:57
Trying to reproduce resque-scheduler #369 issue
require 'resque-scheduler'
class Foo
def self.queue
:foo
end
def message
'hello from foo'
end
@jpillora
jpillora / sshd.go
Last active December 17, 2023 16:27
Go SSH server complete example - Read more here https://blog.gopheracademy.com/go-and-ssh/
// A small SSH daemon providing bash sessions
//
// Server:
// cd my/new/dir/
// #generate server keypair
// ssh-keygen -t rsa
// go get -v .
// go run sshd.go
//
// Client:
@benorama
benorama / .travis.yml
Last active January 10, 2023 18:37
Grails AWS Elastic Beanstalk deployment script
language: groovy
jdk: oraclejdk8
sudo: false # To use new Travis docker-based infrastructure
env:
global:
# $AWS_ACCESS_KEY_ID
- secure: "..."
# $AWS_SECRET_ACCESS_KEY
- secure: "..."