Skip to content

Instantly share code, notes, and snippets.

@hobbsh
hobbsh / kubecon_curl.sh
Created December 9, 2017 04:23
Download Kubecon Austin 2017 presentations from Sched
#!/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)
@geerlingguy
geerlingguy / ansible-role-test.sh
Last active December 14, 2024 17:13
Ansible Role Test Shim Script
#!/bin/bash
#
# Ansible role test shim.
#
# Usage: [OPTIONS] ./tests/test.sh
# - distro: a supported Docker distro version (default = "centos7")
# - playbook: a playbook in the tests directory (default = "test.yml")
# - role_dir: the directory where the role exists (default = $PWD)
# - cleanup: whether to remove the Docker container (default = true)
# - container_id: the --name to set for the container (default = timestamp)
# --------------------------------------------------------------
# script to create a new Docker Swarm from scratch on VirtualBox
# --------------------------------------------------------------
#!/usr/bin/bash
NUM_NODES=5
LEADER_NODE=node-1
# clean up
for NODE in $(seq 1 $NUM_NODES); do
@davehagler
davehagler / ClasspathTestRunner.java
Created May 27, 2016 19:34
Custom Classpath JUnit Test Runner
import java.net.URL;
import java.net.URLClassLoader;
import java.util.ArrayList;
import org.junit.runner.notification.RunNotifier;
import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.model.InitializationError;
public class ClasspathTestRunner extends BlockJUnit4ClassRunner {
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 11, 2025 17:09
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\