Skip to content

Instantly share code, notes, and snippets.

@chaozh
chaozh / stl_views.py
Created March 29, 2016 13:49
STL GDB evaluators/views/utilities
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file
@SpOOnman
SpOOnman / graphite-local-install.sh
Created July 9, 2013 14:02
How to install Graphite as a user on CentOS 5.5
#!/bin/bash
# How to install Graphite as a user on CentOS 5.5 (with neither internet access and root account)
# --------------------------------------------------------------------------------
# Tomasz Kalkosiński - refaktor.blogspot.com
#
# Graphite is a Scalable Realtime Graphing (http://graphite.wikidot.com/)
# This script is based on two excellent tutorials:
# http://community.webfaction.com/questions/10038/how-to-install-pycairo-in-python27-thanks
@skyscribe
skyscribe / .gdbinit
Created October 30, 2012 03:04
GDB init file to print STL containers and data members
#
# STL GDB evaluators/views/utilities - 1.03
#
# The new GDB commands:
# are entirely non instrumental
# do not depend on any "inline"(s) - e.g. size(), [], etc
# are extremely tolerant to debugger settings
#
# This file should be "included" in .gdbinit as following:
# source stl-views.gdb or just paste it into your .gdbinit file
@ryantss
ryantss / check_memory_usage.sh
Created May 19, 2011 04:15
check linux memory usage in percentage
#################################################################
# Developed by Ashok Kumar
# 1:50 PM Monday, February 04, 2008
#################################################################
TOT=`cat /proc/meminfo | grep MemTotal: | awk '{print $2}'`
USED=`cat /proc/meminfo | grep Active: | awk '{print $2}'`
FREE=$[$TOT - $USED ]
LOG=/tmp/mem_monitor.log
echo > $LOG
@GregMefford
GregMefford / setup-statsd-centos.sh
Last active April 10, 2022 15:31 — forked from collegeman/setup-statsd.sh
Install Graphite and StatsD on CentOS (updated for 6.4 x86_64)
# First do a fresh install of CentOS 5.7 i386, server configuration (no GUI)
# This should be performed as root since it's going to be installing a bunch of stuff
# --- Update things to make sure we have the latest patches ---
# Add EPEL so we can get reasonably recent packages
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# --- Install all the packages --- #
yum -y install python-whisper python-carbon graphite-web python-memcached python-ldap httpd memcached
@whiteinge
whiteinge / fabfile.py
Created November 13, 2009 17:16
Example fabric script with VirtualBox automation
# -*- coding: utf-8 -*-
"""MyCompany Fabric script.
* Deploy code
* Set up a local development environment
There are two ways to deploy the myrepo code:
1. :func:`deploy` will do a full virtualenv installation/update and expand a
tarball of the specified git revision (defaults to HEAD) to a timestamped