Skip to content

Instantly share code, notes, and snippets.

@bunchc
bunchc / create_ssh_tunnel.sh
Created August 20, 2017 16:32
Script to create reverse SSH tunnel
#!/bin/bash
createTunnel() {
/usr/bin/ssh -N -R 2222:localhost:22 root@remoteaccess.isa.fuckingasshat.com
if [[ $? -eq 0 ]]; then
echo "Tunnel up!"
else
echo "No such luck, Mario. Princess is $?"
fi
}
#The command to run, built from the raw link of this gist
#START http://boxstarter.org/package/url?https://gist.github.com/bunchc/44e380258384505758b6244e615e75ed/raw/d648fffc21cb3cc7df79e50be6c05b05d29c79cc/0-SystemConfiguration.txt
#########################################
# Set Execution Policy #
#########################################
# Boxstarter options
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$false # Is this a machine with no login password?
@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 / screen_ssh.sh
Created February 22, 2017 16:34 — forked from res0nat0r/screen_ssh.sh
Set screen window title to remote host.
#!/bin/bash
# screen_ssh.sh by Chris Jones <cmsj@tenshu.net>
# Released under the GPL v2 licence.
# Set the title of the current screen to the hostname being ssh'd to
#
# usage: screen_ssh.sh $PPID hostname
#
# This is intended to be called by ssh(1) as a LocalCommand.
# For example, put this in ~/.ssh/config:
#
@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 / 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

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:

---
# 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

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