Skip to content

Instantly share code, notes, and snippets.

kchida

Block or report user

Report or block kchida

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:d1c15f3968f4f8272c49
- What do Etcd, Consul, and Zookeeper do?
- Service Registration:
- Host, port number, and sometimes authentication credentials, protocols, versions
numbers, and/or environment details.
- Service Discovery:
- Ability for client application to query the central registry to learn of service location.
- Consistent and durable general-purpose K/V store across distributed system.
- Some solutions support this better than others.
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
- Centralized locking can be based on this K/V store.
View INSTALL.md

Installing / troubleshooting pants

Requirements

Most of the commons python environment has been developed against CPython 2.6. Things mostly work with CPython 2.7 and recent efforts have been made to improve CPython 3.x and PyPy compatibility. We've explicitly ignored anything prior to CPython 2.6 and in fact generally discourage use against anything less than CPython 2.6.5 as there are known bugs that we're unwilling to fix. We've never even tried running against Jython or

View clock.py
from abc import ABCMeta, abstractmethod
import threading
class ClockInterface(object):
__metaclass__ = ABCMeta
@abstractmethod
def time(self):
pass
View bootstrap_python.sh
INSTALL_ROOT=$HOME/Python
CPY=$INSTALL_ROOT/CPython
PYPY=$INSTALL_ROOT/PyPy
SANDBOX=$(mktemp -d /tmp/python.XXXXXX)
CURL='wget --no-check-certificate'
mkdir -p $INSTALL_ROOT
View README.md

Pex.pex: Usage

PEX files are single-file lightweight virtual Python environments.

pex.pex is a utility that:

  • creates PEX files
  • provides a single use run-environment

Installation

View README.md

Python development using Pants

brian wickman - @wickman

[TOC]

Why use Pants for Python development?

Pants makes the manipulation and distribution of hermetically sealed Python environments

@kchida
kchida / check_jmx_params.pl
Created Jul 27, 2012 — forked from warden/check_jmx_params.pl
check_jmx_params - Nagios script for monitoring Tomcat PermGen OldGen and currentThreads through JNDI JMX
View check_jmx_params.pl
#!/usr/bin/perl
use strict;
use warnings;
use POSIX;
use Getopt::Std;
getopt('h');
##################################################################
# Monitoring JMX by Radek Antoniuk <radek.antoniuk@gmail.com> #
##################################################################
@kchida
kchida / memusg
Created Jul 26, 2012 — forked from netj/memusg
memusg -- Measure memory usage of processes
View memusg
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
#
# Author: Jaeho Shin <netj@sparcs.org>
# Created: 2010-08-16
set -um
# check input
[ $# -gt 0 ] || { sed -n '2,/^#$/ s/^# //p' <"$0"; exit 1; }
You can’t perform that action at this time.