Skip to content

Instantly share code, notes, and snippets.

Avatar

Dale Hamel dalehamel

View GitHub Profile
View kernel
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 3.14.0-rc2 Kernel Configuration
#
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig"
View lddwalk
#!/bin/bash
lddwalk ()
{
files=`ldd $1 | awk '{print $3'} | grep -v "^$"`
for file in $files; do
echo $file
lddwalk $file
done
}
@dalehamel
dalehamel / iocheck.sh
Created Apr 21, 2014
Zero dependency linux IO usage checker
View iocheck.sh
#!/bin/sh
INTERVAL=10
PARTITION=mmcblk0p2
DEVICE=mmcblk0
#PARTITION=sda2
#DEVICE=sda
S_SIZE=`cat /sys/block/$DEVICE/queue/hw_sector_size`
View gist:536a3504aa83a6bb206d
/*
Tool for computing partman partition sizes
Based on partman docs at https://wikitech.wikimedia.org/wiki/PartManAuto
To compile: gcc partman-check.c -o partman-check
To run: ./partman-check
*/
#include <stddef.h>
View gist:a57153cbc7ac73380306
Operating system: Linux
0.0.0 Linux 3.10.20 #1 PREEMPT Sun Apr 27 15:35:54 EDT 2014 armv6l
CPU: arm
ARMv1 ARM ARM1176 features: swp,half,thumb,fastmult,vfpv2,edsp,java,tls
1 CPU
Crash reason: SIGSEGV
Crash address: 0x0
Thread 26 (crashed)
View gist:f6d4c0da355bb6eb368b
Please download the following image:
http://updater.rasplex.com/beta/rasplex-RP-0.5.0.img.gz
We just need a run-through to make sure that things are working as expected before the release.
We also need to verify that auto-update works as expected.
@dalehamel
dalehamel / gist:18f3d082e9285cbf2400
Last active Aug 29, 2015
release notes 0.4.0-rc4
View gist:18f3d082e9285cbf2400
Thanks for being so patient everyone! We're pretty sure you'll agree it was worth the wait.
This is by far the most stable and performant version of RasPlex to date! We expect it will be our last "release candidate" for 0.4.0.
We're running off of the very latest PHT code, which brings in a long-awaited "PlayQueue" feature - enabling you to easily binge on seasons at a time. Please note that this is very new, and any bugs you find should be reporting to Plex, not us.
Here are our notable changes:
changes:
- Based on PHT 1.1.1
@dalehamel
dalehamel / gist:4ee424fbeaf929731ded
Last active Aug 29, 2015
Vagrant File for Alchemy Linux
View gist:4ee424fbeaf929731ded
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@dalehamel
dalehamel / gist:a33daefdd7e842f33e51
Last active Aug 29, 2015
Alchemy Transmuter / Collins vagrant file
View gist:a33daefdd7e842f33e51
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@dalehamel
dalehamel / gist:5528d054d3ad4035f06a
Last active Aug 29, 2015
Hadoop root drive swap
View gist:5528d054d3ad4035f06a
#!/bin/bash
set -x # verbosity
# This script is meant to be run from inside alchemy linux, our PXE rescue system.
# To boot into alchemy, connect to a serial console with ipmitool sol activate, and set the bootdev with 'chassis bootdev pxe'
# The default user:pass is alchemy:transmute
# This script covers swapping out the OS drive of a hadoop node, and is very coupled to this task. The individual sections however may be reused.
# This script should never be run without being watched, and should never be run all at once. Run each section on its own. Ye be warned.
# The first step is to pick a data drive to remove. We'll need to find out the serial for that drive. The only mapping between the physical and logical here is done through "megaraid target id's", which map to the scsi sub slot. Sound confusing? Don't worry, that's because it is, so we'll confuse it more by using the folliwng magical regex: