Skip to content

Instantly share code, notes, and snippets.

View tnolet's full-sized avatar

Tim Nolet tnolet

View GitHub Profile
@tnolet
tnolet / hook_method.js
Created January 15, 2018 21:00 — forked from iamkvein/hook_method.js
Improved way of temporarily replacing a method on an object
var install_hook_to = function(obj) {
if (obj.hook || obj.unhook) {
throw new Error('Object already has properties hook and/or unhook');
}
obj.hook = function(_meth_name, _fn, _is_async) {
var self = this,
meth_ref;
# 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