Skip to content

Instantly share code, notes, and snippets.

@bunchc
bunchc / gist:a51bde9d95d6ae719584f3e278de6ff6
Last active September 22, 2017 19:32
Cinder hates me

user_variables.yml

## Cinder iscsi
cinder_iscsi_helper: tgtadm
cinder_iscsi_iotype: fileio
cinder_iscsi_num_targets: 100
cinder_iscsi_port: 3260

openstack_user_config.yml

@bunchc
bunchc / isroot.sh
Last active November 29, 2017 02:02
Root Password is blank, so set it maybe?
#!/bin/bash
#
# @description Attempt at checking for and mitigating #isroot
#
##
# Get macOS version
OS_Version=$(sudo system_profiler SPSoftwareDataType | grep "System Version" | cut -d : -f 2 | cut -d " " -f 3 | sed "s:.[[:digit:]]*.$::g")
is_root_enabled () {
@bunchc
bunchc / customize.sh
Created January 17, 2018 20:25
Supporting files for packer-builder-arm-image
#!/bin/bash
set -x
# Localse, uncomment if user-data didn't fix these
export LANGUAGE=en_US.UTF-8; export LANG=en_US.UTF-8; export LC_ALL=en_US.UTF-8; locale-gen en_US.UTF-8
# Set locale to en_US.UTF-8
sudo cp /etc/locale.gen /etc/locale.gen.dist
sudo sed -i -e "/^[^#]/s/^/#/" -e "/en_US.UTF-8/s/^#//" /etc/locale.gen
@bunchc
bunchc / 10_update_windows
Last active February 12, 2018 18:39
Rename tmux / byobu windows to ssh hostname
#!/bin/bash
# for byobu, put this file in ~/.byobu/bin
# then chmod +x
# once that's done, every 10 seconds byobu will run this script
# and rename your windows to either the local host name, or to
# the host a windows is ssh'd into
for i in $(tmux list-windows -F '#{window_index}'); do {
panenames=$(tmux list-panes -t $i -F '#{pane_title}' | sed -e 's/:.*$//' -e 's/^.*@//' | uniq)
---
# Install cgminer
- name: Installing cgminer with 2PAC support
hosts: miners
become: true
gather_facts: true
become_method: sudo
vars_files:
- vars/provision.yaml
@bunchc
bunchc / ubuntu-raid.seed
Last active May 26, 2018 14:12
Ubuntu preseed with raid support
#
# Ubuntu Server 16.04 Preseed
#
# Usage:
#
# This Ubuntu Preseed file is meant to be used when installing Ubuntu
# from the ISO. The following menus will require user input, everything
# after will be an unattended install:
#
# * Select a language

Setting up netboot.xyz with an EdgeRouter

This document covers how to setup netboot.xyz, a service that provides iPXE-based installation and live boot of a bunch of operating systems, on a Ubiquiti EdgeRouter.

Assumptions

I've made a few assumptions throughout this document that will probably be different for your setup:

Proposed Agenda(s)

ELI5 Azure

  • Introduction to Azure
  • Concepts, with a focus on how this compares to similar (vmware, hyperv, etc)
    • Compute
    • Networking
    • Storage
  • Security
---
# Downloads and installs an openstack-ansible aio
- name: install | Clone openstack-ansible
git:
repo: https://github.com/openstack/openstack-ansible
dest: "{{ osa_download_location }}"
version: "{{ osa_release }}"
- name: install | Bootstrap Ansible
@bunchc
bunchc / solarized-slack.js
Created April 24, 2018 03:49
solarized-slack
function applycss(css){
var head = document.getElementsByTagName('head')[0];
var s = document.createElement('style');
s.setAttribute('type', 'text/css');
s.appendChild(document.createTextNode(css));
head.appendChild(s);
}
applycss(`
body { background: #002b36; color: #839496; }
a { color: #90939b; }