Skip to content

Instantly share code, notes, and snippets.

View CrashenX's full-sized avatar
🍪
Ohm nom nom

Jesse J. Cook CrashenX

🍪
Ohm nom nom
  • Greater St. Louis
View GitHub Profile
@CrashenX
CrashenX / vim git head
Last active August 29, 2015 14:02
Opens all files modified since specified revision of a git repo in vim and Gdiff them
#!/bin/bash
# You'll need to get vim-fugitive:
# https://github.com/tpope/vim-fugitive
if [ $# -eq 0 ]
then
since='HEAD^'
show_diff=false
else
@CrashenX
CrashenX / gist:8fc6d42ffc154ae0682b
Last active August 29, 2015 14:08
OpenStack Image Objects Prescribed Architecture

Architecture

High-Level Architecture

 +------------+
 |            |
 |    Nova  +----------------------+
 |          | |                    |

+------------+ Glance Middleware +----+

@CrashenX
CrashenX / gist:01de59ae142cefef3138
Last active August 29, 2015 14:23
Normalize Over Positive and Negative Weights
from math import e, exp
def print_8_cent_0(l0, l1):
print(l0)
print(l1)
print(sum(l1))
print(l1[3]/l1[0])
print(l1[7]/l1[4])
print(l1[3]/l1[1])
@CrashenX
CrashenX / team-names.txt
Last active September 29, 2015 22:33
Team Names
Unikitty
French Toast Mafia
Wacky Waving Inflatable Flailing Arm Tube People
Fire Breathing Rubber Duckies
Mighty Morphin Flower Arrangers
e-LEMON-ators
Kung Fu Pandas
Jumping Amazing Super Optimistic Noodle Squad
Soup-A-Stars
Space Monkey Mafia
@CrashenX
CrashenX / git-cc
Created March 14, 2012 12:36
git-cc script
#!/usr/bin/env ruby
@authors = {}
def parse_blame(line)
key, value = line.split(" ", 2)
case key
when "author"
@name = value
when "author-mail"
@CrashenX
CrashenX / libvirt-mininet.xml
Last active January 4, 2016 01:59
Libvirt Domain XML for Mininet Guest ** N.B., I converted the vmdk to a qcow2 using virt-convert ** N.B., Make sure to specify the actual path to your qcow2 disk image
<domain type='kvm'>
<name>mininet</name>
<memory unit='KiB'>1048576</memory>
<currentMemory unit='KiB'>1048576</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
</os>
<features>
<acpi/>
@CrashenX
CrashenX / vm-bridge
Last active July 25, 2016 18:05
Example script for configuring host networking for KVM guest. Works for wireless interface on host.
#!/bin/bash
# "Bridge" Networking between KVM Guest and Host
#
# Copyright (c) 2014 Jesse J. Cook
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@CrashenX
CrashenX / contributor-list.sh
Last active May 1, 2019 23:42
Get Git Contributor List
ORG='libvirt' REPO='libvirt'; for i in {1..5}; do curl "https://api.github.com/repos/$ORG/$REPO/contributors?per_page=100&page=$i" 2>/dev/null | jq -r '.[] | "\(.contributions)\t\(.html_url)"'; done
@CrashenX
CrashenX / debian-on-cubox-i.markdown
Last active February 23, 2021 18:47
Installing Debian on the CuBox-i
@CrashenX
CrashenX / kube_gitlab.md
Last active October 14, 2021 17:23 — forked from kacieh80/kube_gitlab.md
Install Kubernetes on Digital Ocean and run Gitlab

Installing Gitlab with DigitalOcean and Kubernetes

Prerequisites

Create a Kubernetes Cluster

  • In your DigitalOcean account create an empty project and go to Manage &gt; Kubernetes