Skip to content

Instantly share code, notes, and snippets.

View pvacca's full-sized avatar

Phil Vacca pvacca

  • Datavail
  • Milwaukee, WI
View GitHub Profile
@avoidik
avoidik / README.md
Created October 29, 2018 07:37
AWS query examples

Top 10 Examples of AWS CLI Query

List Volumes showing attachment using Dictionary Notation

$ aws ec2 describe-volumes \
  --query 'Volumes[*].{ID:VolumeId,InstanceId:Attachments[0].InstanceId,AZ:AvailabilityZone,Size:Size}'
[
    {
        "InstanceId": "i-a071c394",
@trebortech
trebortech / notes
Created February 15, 2016 15:58
Salt the easy way
The following instructions will help you easily deploy out a SaltStack Master server with some basic settings.
Step 1.
Install docker on your machine where you want to run your SaltStack master. If you want to run this on Windows you could install virtualbox and deploy our a Linux VM that has docker installed on it. Additional network setup instructions are available upon request.
https://docs.docker.com/engine/installation/
Step 2.
Confirm docker is installed and running correctly
#!/usr/bin/env python
import os
import sys
import glob
import argparse
from subprocess import Popen, PIPE, STDOUT
try:
@mcsnolte
mcsnolte / .psqlrc
Created December 2, 2015 20:03
psql helpers to enable CSV output
\set csvon '\\f '','' \\t off \\timing off \\pset format unaligned \\pset border 0 \\pset footer off'
\set csvoff '\\f ''|'' \\t off \\timing on \\pset format aligned \\pset border 2 \\pset footer on'
/**
* This Google Sheets script keeps data in the specified column sorted any time
* the data changes.
*
* After much research, there wasn't an easy way to automatically keep a column
* sorted in Google Sheets, and creating a second sheet to act as a "view" to
* my primary one in order to achieve that was not an option. Instead, I
* created a script that watches for when a cell is edited and triggers
* an auto sort.
*
@rlister
rlister / nginx.conf
Created September 22, 2015 20:36
Running docker registry on fleet
user nginx;
worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
@oscarrenalias
oscarrenalias / README.md
Last active September 27, 2020 18:46
Docker service discovery with HAproxy, consul and registrator on Docker Machine and Docker Swarm
@petere
petere / pgbouncer-schema.sql
Created March 25, 2015 00:13
views for accessing PgBouncer statistics via dblink
CREATE EXTENSION dblink;
-- customize start
CREATE SERVER pgbouncer FOREIGN DATA WRAPPER dblink_fdw OPTIONS (host 'localhost',
port '6432',
dbname 'pgbouncer');
CREATE USER MAPPING FOR PUBLIC SERVER pgbouncer OPTIONS (user 'pgbouncer');
-- customize stop
@ubermuda
ubermuda / nginx.conf
Created November 5, 2013 22:13
Proxy a unix socket HTTP server to a tcp port using nginx.
server {
listen 127.0.0.1:9000;
location / {
proxy_pass http://unix:/var/run/docker.sock:/;
}
}