Skip to content

Instantly share code, notes, and snippets.

Avatar
😅

Tim Nolet tnolet

😅
View GitHub Profile
@tnolet
tnolet / hook_method.js
Created Jan 15, 2018 — forked from iamkvein/hook_method.js
Improved way of temporarily replacing a method on an object
View hook_method.js
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;
View setup-statsd-centos.sh
# 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
You can’t perform that action at this time.