Skip to content

Instantly share code, notes, and snippets.

@bunchc
bunchc / hub_ctrl.py
Created February 11, 2019 21:28
There Are Four Lights - USB Control
#! /usr/bin/python
"""
hub_ctrl.py - a tool to control port power/led of USB hub
Copyright (C) 2006, 2011, 2016 Free Software Initiative of Japan
Author: NIIBE Yutaka <gniibe@fsij.org>
This file is a part of Gnuk, a GnuPG USB Token implementation.
@bunchc
bunchc / Dockerfile
Last active February 11, 2019 21:23
There Are Door Lights
FROM arm32v6/alpine:latest
RUN apk --no-cache add \
bash \
python3 \
python3-dev \
build-base \
vim \
git \
curl \
@bunchc
bunchc / ansible_python_interpreter
Created October 11, 2018 16:29
Using /etc/ansible/group_vars/all
```
2018-10-11 16:23:40 ⌚ bunchc in ~
○ → ansible -m setup 10.208.135.122 | grep ansible_python_version
"ansible_python_version": "3.6.6",
2018-10-11 16:24:00 ⌚ bunchc in ~
○ → cat /etc/ansible/group_vars/all
---
ansible_python_interpreter: /usr/bin/python3
@bunchc
bunchc / gist:8afce8a4fe2f1bbaf352512a6a23a2bc
Created August 21, 2018 16:56 — forked from danielestevez/gist:2044589
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}
@bunchc
bunchc / cloudbase-init.conf
Created June 14, 2018 14:41
My cloudbase-init.conf file
[DEFAULT]
# If set to true, the logging level will be set to DEBUG instead of
# the default INFO level.
debug=true
# If set to false, the logging level will be set to WARNING instead
# of the default INFO level.
verbose=true
@bunchc
bunchc / install_adfs.ps1
Created May 9, 2018 21:20
Install and configure adfs with powershell
$domainName = "{{ windows_domain_info['dns_domain_name'] }}"
$password = "{{ windows_domain_info['domain_admin_password'] }}"
$securePassword = ConvertTo-SecureString $password -AsPlainText -Force
$fqdn = [System.Net.Dns]::GetHostByName(($env:computerName)) | FL HostName | Out-String | %{ "{0}" -f $_.Split(':')[1].Trim() };
$filename = "C:\$fdqn.pfx"
$user = "{{ windows_domain_info['dns_domain_name'] }}\{{ windows_domain_info['domain_admin_user'] }}"
$credential = New-Object `
-TypeName System.Management.Automation.PSCredential `
-ArgumentList $user, $securePassword
@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; }
---
# 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

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: