Skip to content

Instantly share code, notes, and snippets.

@ksexton
ksexton / riemann.config
Created March 7, 2014 16:04
Riemann Config
;;; -*- mode: clojure; -*-
;;; vim: filetype=clojure
(logging/init :file "/var/log/riemann/riemann.log")
(let [host "0.0.0.0"]
(tcp-server :host host)
(udp-server :host host)
(ws-server :host host))
@ksexton
ksexton / CHEATSHEET.md
Created March 10, 2014 19:19
mcollective cheatsheet

mcollective cheatsheet

Agents

List installed agents

$ mco plugin doc
cd ~
mkdir public_html
cd public_html
rm -fr *
wget "https://wordpress.org/latest.tar.gz"
tar -zxvf latest.tar.gz
mv wordpress/* .

Keybase proof

I hereby claim:

  • I am ksexton on github.
  • I am kes (https://keybase.io/kes) on keybase.
  • I have a public key whose fingerprint is EB66 FD26 B5F7 7BD7 3E8B 36C8 9298 844A FDF1 6A35

To claim this, I am signing this object:

user> (pprint (map collatz (range 1 11)))
((1)
(2 1)
(3 10 5 16 8 4 2 1)
(4 2 1)
(5 16 8 4 2 1)
(6 3 10 5 16 8 4 2 1)
(7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1)
(8 4 2 1)
(9 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2 1)
tail -1 ~/.tmux.conf ~/.vimrc ~/.zshrc
==> /Users/kes/.tmux.conf <==
source /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf
==> /Users/kes/.vimrc <==
source /usr/local/lib/python2.7/site-packages/powerline/bindings/vim/plugin/powerline.vim
==> /Users/kes/.zshrc <==
source /usr/local/lib/python2.7/site-packages/powerline/bindings/zsh/powerline.zsh
@ksexton
ksexton / InstallBerkshelfOnCygwin.md
Created December 10, 2015 16:43 — forked from DQNEO/InstallBerkshelfOnCygwin.md
How to Install Berkshelf version3 on Cygwin 64bit

How to Install Berkshelf version3 on Cygwin 64bit

Installation of Berkshelf v3 on Cygwin is known to be very diffcult, but I have finally found the way. 😄

You can successfully install it by following the procedure below.

(As at 2014/6/8, v3.1.3 is available)

Why is it so difficult ?

@ksexton
ksexton / chefdk-rvm.sh
Created January 31, 2017 17:21 — forked from asnodgrass/chefdk-rvm.sh
Making ChefDK work with RVM
# Assumption: Mac OS X
CHEFDK="/opt/chefdk/embedded"
CHEFDK_USER="$HOME/.chefdk/gem/ruby/2.1.0"
RVM_GEMS="$HOME/.rvm/gems"
RVM_RUBIES="$HOME/.rvm/rubies"
RUBY_NAME="ext-chefdk-ruby"
mkdir -p $RVM_RUBIES/$RUBY_NAME
ln -s $CHEFDK/bin $RVM_RUBIES/$RUBY_NAME
@ksexton
ksexton / cleanup.sh
Created March 16, 2017 19:44
cleanup centos
yum -y update && \
yum -y install yum-utils && \
service rsyslog stop && \
service auditd stop && \
package-cleanup --oldkernels -y –count=1 && \
yum clean all && \
logrotate -f /etc/logrotate.conf
rm -f /var/log/*-???????? /var/log/*.gz
rm -f /var/log/dmesg.old
@ksexton
ksexton / altnetworking.sh
Created April 14, 2017 23:04 — forked from level323/altnetworking.sh
Run a command inside a customised networking environment (using cgroups)
#!/bin/bash
# === INFO ===
# altnetworking.sh
# Description: Run the specified application in a custom networking environment.
# Uses cgroups to run process(es) in a network environment of your own choosing (within limits!)
VERSION="0.1.0"
# Author: John Clark
# Requirements: Debian 8 Jessie (plus iptables 1.6 from unstable)
#