Skip to content

Instantly share code, notes, and snippets.

View deepak-kosaraju's full-sized avatar

Deepak Kosaraju deepak-kosaraju

View GitHub Profile
@mminer
mminer / cachedecorator.py
Created January 12, 2015 23:57
An example of a Python decorator to simplify caching a function's result.
"""An example of a cache decorator."""
import json
from functools import wraps
from redis import StrictRedis
redis = StrictRedis()
def cached(func):
@bknowles
bknowles / README.md
Created October 25, 2011 23:09 — forked from atomic-penguin/README.md
multi-knife-howto

Overview

Here is an example shared configuration for knife. You can drop this off in your chef-repo/.chef/ directory, and multiple developers can use the same knife configuration to interact with more than one Chef server, or the Opscode platform.

By using Bash functions and environment variables we can change the chef server, which knife is configured to use, on the fly.

NOTE: knife will probably ignore your ~/.chef/knife.rb once you begin using a shared knife.rb in your chef-repo directory.

Preparation

#
# Cookbook Name:: yumrepo
# Definition:: yumrepo
#
# Copyright 2010, Tippr Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#