Skip to content

Instantly share code, notes, and snippets.

View damienstanton's full-sized avatar

Damien Stanton damienstanton

View GitHub Profile
Cluster Status:
Last updated: Tue Feb 10 12:58:52 2015
Last change: Tue Feb 10 11:26:09 2015 via crmd on freepbx-a
Stack: cman
Current DC: freepbx-a - partition with quorum
Version: 1.1.10-14.el6-368c726
2 Nodes configured
22 Resources configured
PCSD Status:
cpu:
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
cpu:
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
Intel(R) Xeon(R) CPU X5660 @ 2.80GHz, 2800 MHz
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<!-- This program is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU General Public License as -->
<!-- published by the Free Software Foundation; either version 2 of the -->
<!-- License, or (at your option) any later version. -->
<!-- -->
<!-- This program is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
# Uses https://github.com/erikw/tmux-powerline, despite deprecation warning it works more reliably
# than Powerline, at least on Ubuntu
set-option -g status on
set-option -g status-interval 2
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 95
set-option -g status-right-length 60
set-option -g status-left "#(~/XS/tmux-powerline/powerline.sh left)"
/*
------------------ Object Orientation in Go --------------------------------
Polymorphism
Method Implementation (using value or pointer receivers)
Interfaces
Class Inheritance (Type Embedding)
*/
package main
import "fmt"
/*
Twelve best practices for Go
1. Avoid nesting by handling errors first
2. DRY
3. Write important code first
4. Document properly
5. Naming should be as short as descriptively possible
6. Separate concerns: package/file
7. Make sure packages are "go get"-able
#!/bin/bash
for file in *.mp3 *.wav; do
year=$(echo $file | cut -c9-12)
month=$(echo $file | cut -c13-14)
day=$(echo $file | cut -c15-16)
mkdir -p "$year/$month/$day/"
mv "$file" "$year/$month/$day/"
done
@damienstanton
damienstanton / sorteroutput.md
Created April 10, 2015 18:16
sorter output
.
|-- 2013
|   `-- 10
|       `-- 05
|           `-- q670029-20131005-090643-1380978388.10018132.wav
|-- 2014
|   `-- 10
|       `-- 13
|           `-- q670031-20141013-175400-1413237233.1162749.wav
@damienstanton
damienstanton / altpy.sh
Last active August 29, 2015 14:19
Build alt python without harming system python (CentOS)
# install these first, otherwise python will build without them and complain about zlib missing
zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
# download Python source, untar and cd into source dir
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
# if you don't use altinstall, you're gonna have a bad day
make && make altinstall