Skip to content

Instantly share code, notes, and snippets.

@mynameisfiber
mynameisfiber / s4lru.py
Last active July 20, 2016 20:20
Short and Simple S4LRU Cache
from collections import OrderedDict
class S4LRU(object):
"""
Short and Simple [S4LRU][1]cache. Implemented by Micha Gorelick
(http://github.com/mynameisfiber) and released under the do whatever you
want license.
[1] http://www.cs.cornell.edu/~qhuang/papers/sosp_fbanalysis.pdf
"""
@jedi4ever
jedi4ever / gemspec file
Created May 15, 2011 18:34
Patch to take mcollective gitcode and turn it into a gem for mcollective-client
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = "mcollective-client"
s.version = "1.0.2"
s.platform = Gem::Platform::RUBY
s.authors = ["RI Pienaar"]
s.email = ["ripienaar@puppetlabs.com"]
s.homepage = "https://github.com/puppetlabs/marionette-collective"
s.summary = %q{Mcollective client}
s.description = %q{Interact with mcollective}
@phrawzty
phrawzty / agentreload.rb
Created March 25, 2011 09:37
An MCollective agent to hot-reload MCollective agents (simple RPC-style)
module MCollective
module Agent
class agentreload<RPC::Agent
action 'reload' do
reload
end
private
def reload