Skip to content

Instantly share code, notes, and snippets.

View riptidewave93's full-sized avatar

Chris Blake riptidewave93

View GitHub Profile
@riptidewave93
riptidewave93 / distro
Created February 5, 2016 21:17
Observium Distro Script
#!/bin/sh
#
# Observium License Version 1.0
# =============================
#
# Copyright (c) 2013-2015 Joe Holden, (c) 2015-2016 Observium Limited
#
# The intent of this license is to establish the freedom to use, share and contribute to
# the software regulated by this license.
#
@riptidewave93
riptidewave93 / air-oeap602.cfg
Created April 25, 2015 14:17
OpenOCD Board Cisco Air-OEAP602
#
# http://www.cisco.com/c/en/us/support/wireless/aironet-602-officeextend-access-point/model.html
#
set partition_list {
CFE { Bootloader 0xbc000000 0x00040000 }
firmware { "Kernel+rootfs" 0xbc040000 0x00400000 }
app1 { "app1" 0xbc440000 0x00400000 }
app2 { "app2" 0xbc840000 0x00400000 }
log { "log" 0xbcc40000 0x00340000 }
@riptidewave93
riptidewave93 / distro
Created April 22, 2015 15:06
Observium /usr/bin/distro script
#!/bin/sh
# Detects which OS and if it is Linux then it will detect which Linux Distribution.
OS=`uname -s`
REV=`uname -r`
MACH=`uname -m`
if [ "${OS}" = "SunOS" ] ; then
OS=Solaris
ARCH=`uname -p`
#!/bin/bash
NumCPU=$(grep -c ^processor /proc/cpuinfo)
NumJobs=$(calc -p "ceil(2*$NumCPU+1)")
export CONCURRENCY_LEVEL=$NumJobs
baseURL="https://www.kernel.org/pub/linux/kernel/v3.x/"
latest="$(curl -s $baseURL | sed -n 's|\(.*\)\(linux-\)\(.*\)\(\.tar\.xz<\)\(.*\)|\3|p' | sort --version-sort | tail -n1)"
[ ! "$latest" ] && { echo "Are we offline?" >&2; exit 1; }