Skip to content

Instantly share code, notes, and snippets.

@kchida
kchida / memusg
Created July 26, 2012 03:09 — forked from netj/memusg
memusg -- Measure memory usage of processes
#!/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; }
@kchida
kchida / check_jmx_params.pl
Created July 27, 2012 23:13 — forked from rantoniuk/check_jmx_params.pl
check_jmx_params - Nagios script for monitoring Tomcat PermGen OldGen and currentThreads through JNDI JMX
#!/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 / README.md
Created January 23, 2014 05:27 — forked from wickman/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 / README.md
Created January 23, 2014 05:28 — forked from wickman/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

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
@kchida
kchida / clock.py
Created January 23, 2014 05:31 — forked from wickman/clock.py
from abc import ABCMeta, abstractmethod
import threading
class ClockInterface(object):
__metaclass__ = ABCMeta
@abstractmethod
def time(self):
pass
@kchida
kchida / INSTALL.md
Created January 23, 2014 05:32 — forked from wickman/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