Skip to content

Instantly share code, notes, and snippets.

View sambrightman's full-sized avatar

Sam Brightman sambrightman

View GitHub Profile
#!/usr/bin/env bash
BASH_TAP_ROOT=bash-tap
source ./bash-tap/bash-tap-bootstrap
PATH=../bin:$PATH # for freebayes
plan tests 1
ref=$(basename $0).ref
@sambrightman
sambrightman / diff_runs
Last active October 6, 2016 14:33
Interactive recursive diff with extra hacks for some pipeline specifics
#!/usr/bin/env bash
# works much better if runs have the same name on the same machine (i.e. rename first directory after run)
# much easier to view diffs with colordiff installed
# some files will differ only by dates/times/run times/references to unique job names, just gotta check 'em
# we ignore whitespace in contents
# we try to match filenames that have SGE pid/job names (but not in contents)
# some files will get processsed out-of-order and fail this matching
#!/usr/bin/env bash
# This is a significant extension of the sample script intended to be
# more precise and robust than most Gists that attempt to prevent
# destructive/unintended operations on protected branches. Modify
# protected_branches with full symbolic refs or incomplete_prefixes
# with commit message prefixes which indicate work-in-progress.
# Probably should be written in another language.
# Original commentary:
# https://wiki.ubuntu.com/Kernel/Dev/KernelGitGuide
# https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
# https://wiki.ubuntu.com/Kernel/Handbook/ReleaseManagement/MaintainingRelease
release=yakkety
base_tag=v4.8
#git clone git://kernel.ubuntu.com/ubuntu/linux.git
#git clone --reference linux git://kernel.ubuntu.com/ubuntu/ubuntu-${release}.git
git fetch
// ==UserScript==
// @name Cya WMD shortcuts
// @author Rob W
// @description Disables the annoying keyboard shortcuts in StackExchange sites' Markdown editors
// @namespace http://meta.stackexchange.com/questions/2980/is-there-a-way-to-disable-the-hotkeys
// @version 1.0
// @include http://apple.stackexchange.com/*
// @include http://stackoverflow.com/*
// @include http://superuser.com/*
// @include http://meta.superuser.com/*
[sam@Sams-MacBook-Pro src ((776efec...) *%)]$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.freec init
make[1]: Nothing to be done for `init'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.freec depend
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.freec all
c++ -O3 -g -DPROFILE_TRACE -Wall -m64 -c -o main.o main.cpp
main.cpp:586:61: warning: equality comparison result unused [-Wunused-comparison]
if (seekSubclones==0 ||seekSubclones==1) {seekSubclones==100;}
~~~~~~~~~~~~~^~~~~
main.cpp:586:61: note: use '=' to turn this equality comparison into an assignment
@sambrightman
sambrightman / RAID re-design.txt
Last active January 10, 2017 13:26
RAID re-design
# find right controller/virtual drive:
sudo /opt/MegaRAID/storcli/storcli64 show all
sudo /opt/MegaRAID/storcli/storcli64 /c0 show all
sudo /opt/MegaRAID/storcli/storcli64 /c0/v0 show all
...
sudo umount /datam
sudo umount /datan
@sambrightman
sambrightman / install_prometheus.sh
Last active January 4, 2017 10:50
Setup Prometheus
####
install_base_dir=/opt/prometheus
data_base_dir=/data/prometheus
####
function install_prometheus() {
add_user_and_group
prometheus_version=1.4.1
data_dir=${data_base_dir}/prometheus
@sambrightman
sambrightman / rename SGE host.txt
Last active January 10, 2017 14:02
rename SGE host
# need manager privileges for some things?
# rename, leave old name in /etc/hosts as an alias for now (end of line, real name should be first)
sudo emacs /etc/hostname /etc/hosts
export HOSTNAME=crunch002
sudo hostname crunch002
# stop services, check status
sudo systemctl stop sgemaster.p6444 sgeexecd.p6444
sudo systemctl status sgemaster.p6444 sgeexecd.p6444
@sambrightman
sambrightman / Gemfile
Last active September 18, 2017 14:29
robe setup for Linuxbrew
lib = File.expand_path('../Library/Homebrew', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
source 'https://rubygems.org'
ruby '2.4.0'
#ruby-gemset=linuxbrew
gem 'method_source'
gem 'pry'