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 / 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 / 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 / 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 / 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 / debian-on-cubox-i.markdown
Last active February 23, 2021 18:47
Installing Debian on the CuBox-i
@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 / android-root.md
Last active June 25, 2023 06:31
Android Live Root Image

Root Access to Android Device Without "Rooting" (The Hard Way)

Intro

N.B., This is for educational purposes only. If you want an easier method, compile an engineering build of the recovery.img and boot it: https://source.android.com/source/building.html

N.B., This is a work in progress. I'm updating for Nexus 5X and Android 6.0.0. Booting the modified recovery.img does not currently start adbd. I've created

@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
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* Get the current URL.
*
* @param {function(string)} callback - called when the URL of the current tab
* is found.
*/