Skip to content

Instantly share code, notes, and snippets.

View szaydel's full-sized avatar

Sam Zaydel szaydel

  • RackTop Systems
  • Moss Beach
View GitHub Profile
@szaydel
szaydel / graphite-client.py
Created July 6, 2012 06:10 — forked from codification/graphite-client.py
Graphite client in python
import time
import socket
def collect_metric(name, value, timestamp):
sock = socket.socket()
sock.connect( ("localhost", 2003) )
sock.send("%s %d %d\n" % (name, value, timestamp))
sock.close()
def now():
int(time.time())
@szaydel
szaydel / agent.conf
Created November 7, 2012 14:37 — forked from fxtentacle/agent.conf
Hajo's logstash config
input {
exec {
type => "dstat"
command => "dstat -cdngypms --nocolor 1 0"
interval => 13
}
exec {
type => "apache-benchmark"
@szaydel
szaydel / fish_prompt.fish
Created November 10, 2012 04:16 — forked from terlar/fish_prompt.fish
Prompt for fish with git statuses
set -U fish_color_user magenta
set -U fish_color_host yellow
function fish_prompt --description 'Write out the prompt'
set -l last_status $status
# User
set_color $fish_color_user
printf (whoami)
set_color normal
@szaydel
szaydel / README
Created November 12, 2012 16:48 — forked from bewest/README.markdown
Using pyCLI to create some commands and subcommands.
Using pyCLI to create some commands and subcommands.
@szaydel
szaydel / tmux.md
Created November 12, 2012 22:39 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@szaydel
szaydel / zfs_notes.md
Created February 24, 2013 15:33 — forked from dch/zfs_notes.md

pool management

  • create a new pool by first creating an empty partition space using diskutil or Disk Utility

adding a mirror to an existing pool

check current status

zpool status -v
#! /usr/bin/env python
from pykka.actor import Actor
import pykka
import urllib
class Fetcher(Actor):
def fetch(self, url):
return urllib.urlopen(url).read()
@szaydel
szaydel / afp-krb5.conf
Last active July 8, 2022 15:41 — forked from oscarcck/afp.conf
AFP Configuration File Examples
; Copyright 2009-2015 RackTop Systems Inc. and/or its affiliates.
; http://www.racktopsystems.com
;
; The methods and techniques utilized herein are considered TRADE SECRETS
; and/or CONFIDENTIAL unless otherwise noted. REPRODUCTION or DISTRIBUTION
; is FORBIDDEN, in whole and/or in part, except by express written permission
; of RackTop Systems.
;
; @@DESCRIPTION@@ Configuration file for Netatalk -- Apple Filing Protocol.
; @@NAME@@ afp.conf
Install prerequisites:
$ sudo apt-get install build-essential pkg-config checkinstall git-core avahi-daemon libavahi-client-dev libcrack2-dev libwrap0-dev autotools-dev automake libtool libdb-dev libacl1-dev libdb5.1-dev db-util db5.1-util libgcrypt11 libgcrypt11-dev
Download src:
$ cd /some/temp/dir
$ git clone git://git.code.sf.net/p/netatalk/code netatalk
$ cd netatalk
$ ./bootstrap