This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DAYS=("2017-12-06" "2017-12-07" "2017-12-08") | |
for DAY in "${DAYS[@]}"; do | |
#Super shitty pipefest because of grep matched groups sadness | |
LINKS=($(curl https://kccncna17.sched.com/${DAY}/overview | grep -oEi "f='(.*)' cl" | cut -d\' -f 2 | tr '\n' ' ')) | |
for LINK in "${LINKS[@]}"; do | |
echo "Requesting https://kccncna17.sched.com/${LINK}" | |
#Find file link on event page | |
FILE_URL=$(curl -s https://kccncna17.sched.com${LINK} | grep "file-uploaded" | cut -d\" -f 4) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Test-RegistryValue { | |
param( | |
[Alias("PSPath")] | |
[Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] | |
[String]$Path | |
, | |
[Parameter(Position = 1, Mandatory = $true)] | |
[String]$Name | |
, | |
[Switch]$PassThru |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Author: Wylie Hobbs - 01/15/2018 | |
import requests | |
import sys | |
import json | |
import socket | |
import time | |
# Set your carbon server's IP/port |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section data-background-transition='zoom' data-transition='concave' data-background='https://pixel.nymag.com/imgs/daily/vulture/2016/07/29/29-steve-brule-check-it-out.w710.h473.2x.jpg' data-state='blackout'> | |
<h2>Kubernetes Resource Quotas and Resource Limits</h2> | |
</br> | |
<h3>For your health</h3> | |
</section> | |
<section data-background-transition='zoom' data-transition='linear' id='try-it'> | |
<section data-transition='concave'> | |
<h2>Resource Limits vs Resource Quotas</h2> | |
<p>Memory and CPU constraints for a container are configured with resource requests and resource limits</p> | |
<p><b>Resource Quotas:</b> are resource limits that apply to a namespace</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# As mentioned here: https://thinklumo.com/blue-green-node-deployment-kubernetes-eks-terraform | |
# Author: Wylie Hobbs - 2018 | |
# usage: | |
# normal: ./drain_old_nodes.sh | |
# dry run: ./drain_old_nodes.sh noop | |
DRY_RUN="$1" | |
function drain(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Wylie Hobbs - 2018 | |
# Copy multiple tables at once with redshift unload-copy utility | |
# Usage: ./redshift_unload_wrapper.sh | |
# Requires a clone of amazon-redshift-utils and the packages: jq, awscli | |
# Create redshift_unload_wrapper.sh, tables.txt and config.json in src/UnloadCopyUtility and run this script | |
#tables.txt is newline delimited list of tables in SCHEMA.TABLE notation | |
TABLES=$(cat tables.txt) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import multiprocessing | |
import psycopg2 | |
import time | |
""" | |
Run analyze on multiple tables in parallel | |
Author: Wylie Hobbs - 2018 | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import random | |
import sys | |
import threading, Queue | |
from heapq import nlargest | |
import os | |
# job queue | |
queue = Queue.Queue() | |
# result queue |