Skip to content

Instantly share code, notes, and snippets.

View brockers's full-sized avatar

Bobby Rockers brockers

View GitHub Profile
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/fedora/29/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
[docker-ce-stable-debuginfo]
name=Docker CE Stable - Debuginfo $basearch
baseurl=https://download.docker.com/linux/fedora/29/debug-$basearch/stable
@brockers
brockers / README_Template.md
Created March 24, 2019 22:11
Basic Project README Template

Project Name

Long form project description

Setup

Linux

Mac

@brockers
brockers / ScriptFileTemplate.sh
Created March 13, 2019 04:14
Some of the more useful design elements I put into any bash script that is going to be used more than once
#!/usr/bin/env bash
set -euo pipefail
# Enablig debug if DEBUG environment variable
${DEBUG:+set -x}
declare -a OVERRIDE_VALS
# Define script file path
REALPATH="$(dirname "$(realpath "$0")")"
@brockers
brockers / binary_operators_cheatsheet.md
Last active January 8, 2019 19:16
Quick lookup cheatsheet to demonstrate binary operators in C/C++

Binary Operators

Reference Values

128 64 32 16 8 4 2 1 VALUE
0 0 1 1 1 1 0 0 60
0 0 0 0 1 1 0 1 13

Dual Argument Operators

@brockers
brockers / check_quiz.sh
Last active December 14, 2018 06:26
Quick script to check Linux Class Quiz
#!/bin/bash
SERVER="$2"
USER="$1"
mprint(){
MESSAGE="$1"
echo "===================== $MESSAGE ============================"
}
@brockers
brockers / aws_bash_setup.sh
Created November 9, 2018 20:45
AWS Bashrc Profile
# AWS Scripting functionality
#######################################################
if type "aws" > /dev/null; then
complete -C aws_completer aws;
fi
AWSCONFPATH="$HOME/.aws/config"
if [ -f "$AWSCONFPATH" ]; then
export AWS_ACCESS_KEY_ID=$(awk -F "=" '/aws_access_key_id/ {print $2}' $HOME/.aws/config)
export AWS_SECRET_ACCESS_KEY=$(awk -F "=" '/aws_secret_access_key/ {print $2}' $HOME/.aws/config)
@brockers
brockers / _compileHomework.sh
Created November 1, 2018 02:41
Quick script to compile all students software
#!/bin/bash
MAIN=$(pwd)
for NAME in */; do
echo "==== Processing user $NAME ======"
cd "$NAME"
for PROJECT in */; do
if [[ -d "$PROJECT" ]]; then
echo "Compiling $PROJECT"
// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@brockers
brockers / Makefile
Last active August 30, 2016 20:11
MD to HTML Makefile
# 'Makefile'
MARKDOWN = pandoc --from markdown_github --to html --standalone
all: $(patsubst %.md,%.html,$(wildcard *.md)) Makefile
clean:
rm -f $(patsubst %.md,%.html,$(wildcard *.md))
rm -f *.bak *~
%.html: %.md
$(MARKDOWN) $< --output $@