Skip to content

Instantly share code, notes, and snippets.

View briancline's full-sized avatar

Brian Cline briancline

  • SoftLayer / IBM Cloud
  • Dallas, Texas
View GitHub Profile
@briancline
briancline / gist:4950632
Created February 14, 2013 04:38
Adventures in IPv6 addressing
[bc@app01v6 ~]# host cilantro.nom.co
cilantro.nom.co has address 50.97.141.187
cilantro.nom.co has IPv6 address 2607:f0d0:1102:a1::f00d:face
[bc@app01v6 ~]# host taco.sh
taco.sh has address 50.97.141.187
taco.sh has IPv6 address 2607:f0d0:1102:a1::beef:7ac0
@briancline
briancline / consume.py
Created March 9, 2013 07:55
Queue consumer with some creates/deletes persisted in a Riak bucket
#!/usr/bin/env python
from __future__ import print_function
import json
import ConfigParser
import optparse
import pika
import riak
from pprint import pprint
from pika.adapters import SelectConnection
@briancline
briancline / cinder-exception.log
Created April 21, 2013 01:00
cinder-scheduler exception
2013-04-20 19:37:06 DEBUG [cinder.openstack.common.rpc.amqp] received {u'_context_roles': [u'admin', u'KeystoneServiceAdmin', u'KeystoneAdmin'], u'_context_request_id': u'req-b71ffcb4-6bc6-4363-accf-27e0d7efe67f', u'_context_quota_class': None, u'_unique_id': u'1f422d7718934f78bb9979e5c30e2155', u'_context_read_deleted': u'no', u'args': {u'request_spec': {u'volume_id': u'43cbc9f9-8f54-49b6-bb23-51c35a57ad5a', u'volume_properties': {u'status': u'creating', u'volume_type_id': u'ac184299-31dd-476e-823c-359907eec853', u'display_name': u'holler', u'availability_zone': u'nova', u'attach_status': u'detached', u'source_volid': None, u'metadata': {}, u'volume_metadata': [], u'display_description': u'', u'snapshot_id': None, u'user_id': u'fb2aa1439e954d6e8318e58ad58d7fbc', u'project_id': u'e0ecbcdfcc4d44f687c90be8503b6b5f', u'id': u'43cbc9f9-8f54-49b6-bb23-51c35a57ad5a', u'size': 1}, u'volume_type': {u'name': u'micro', u'deleted': False, u'created_at': u'2013-04-20T23:30:35.000000', u'updated_at': None, u'extra_spec
@briancline
briancline / gist:5471474
Created April 27, 2013 01:13
Kernel panic at the Nova disco (nova2.bc)
Apr 25 15:14:49 nova2 kernel: [11564.325414] sbridge: HANDLING MCE MEMORY ERROR
Apr 25 15:14:49 nova2 kernel: [11564.325456] CPU 0: Machine Check Exception: 0 Bank 5: cc000c0000010092
Apr 25 15:14:49 nova2 kernel: [11564.325459] TSC 0 ADDR 102a980 MISC 2040282886 PROCESSOR 0:206d7 TIME 1366920889 SOCKET 0 APIC 0
Apr 25 15:14:49 nova2 kernel: [11564.325498] sbridge: HANDLING MCE MEMORY ERROR
Apr 25 15:14:49 nova2 kernel: [11564.325501] CPU 0: Machine Check Exception: 0 Bank 5: cc00018000010092
Apr 25 15:14:49 nova2 kernel: [11564.325503] TSC 0 ADDR 2265b1080 MISC 21405cdc86 PROCESSOR 0:206d7 TIME 1366920889 SOCKET 0 APIC 0
Apr 25 15:14:49 nova2 kernel: [11564.325532] sbridge: HANDLING MCE MEMORY ERROR
Apr 25 15:14:49 nova2 kernel: [11564.325549] CPU 0: Machine Check Exception: 0 Bank 5: cc00040000010092
Apr 25 15:14:49 nova2 kernel: [11564.325551] TSC 0 ADDR 25a982c80 MISC 2048028286 PROCESSOR 0:206d7 TIME 1366920889 SOCKET 0 APIC 0
Apr 25 15:14:49 nova2 kernel: [11564.325580] sbridge: HANDLING MCE MEMORY ERRO
@briancline
briancline / gist:5576850
Created May 14, 2013 15:30
Quantum/OVS - port references with errors
root@nova3:~# ovs-dpctl show
system@br-ext:
lookups: hit:435770 missed:19739 lost:0
flows: 5
port 0: br-ext (internal)
port 1: bond1
May 14 10:26:30|00001|netdev_linux|WARN|/sys/class/net/qg-084b952d-71/carrier: open failed: No such file or directory
port 2: qg-084b952d-71 (internal)
system@br-tun:
lookups: hit:6947 missed:14688 lost:0
@briancline
briancline / gist:5598491
Created May 17, 2013 11:26
Thrift 0.8.0 -> 0.9.0 RPM spec file changes
--- thrift-0.8.0.spec 2012-06-10 16:50:54.000000000 -0500
+++ thrift-0.9.0.spec 2013-05-17 02:37:48.000000000 -0500
@@ -39,7 +39,7 @@
%{!?ruby_sitearch: %global ruby_sitearch %(ruby -rrbconfig -e "puts Config::CONFIG['sitearchdir']")}
Name: thrift
-Version: 0.8.0
+Version: 0.9.0
Release: 1%{?dist}
Summary: A multi-language RPC and serialization framework
echo "ttyS0" > /etc/securetty
vi /etc/grub.conf
# Add console=ttyS0 to the end of kernel line(s)
vi /etc/sysconfig/init
# Edit ACTIVE_CONSOLES to look like:
ACTIVE_CONSOLES="/dev/tty[1-6] /dev/ttyS0"
# If on a live system, do the following
ddns-update-style none;
deny bootp; #default
authoritative;
include "/etc/dhcp/ipxe-option-space.conf";
# GREEN
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.100 10.1.1.199;
option subnet-mask 255.255.255.0;

Booting with CNXSoft image

Reference: http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/

curl -O https://dl.dropbox.com/u/45842273/2012-07-15-wheezy-raspian-minimal.img.7z

yum install p7zip
7za e 2012-07-15-wheezy-raspian-minimal.img.7z

qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda 2012-07-15-wheezy-raspian-minimal.img -net nic -net user -vnc :0 -net tap,ifname=vnet0,script=no,downscript=no
@briancline
briancline / gist:7530880
Last active December 28, 2015 16:39
Simple Luhn formula function
<?php
/* From http://adrianotto.com/2011/10/better-luhn-formula-validator-for-php/ */
/*
* Copyright 2011 Adrian Otto
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0