This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include_recipe "collectd" | |
class ChefCollectdPluginReportHandler < Chef::Handler | |
def report | |
Chef::Log.info('Running collectd hander') | |
node[:last_success_time] = Time.now.to_f | |
node[:error_count_since_success] = 0 | |
node.save | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPNG Raid Manager | |
// Questions, comments, bug reports or donations to: magnet0 | |
// | |
// Updated points values and current maintenance handled by magnet0 | |
// | |
// ==UserScript== | |
// @name SPNG - hobopolis manager | |
// @namespace http://userscripts.org/scripts/source/86676.user.js | |
// @description Version 2.41 - modifed from slyz version of Dr3v1's Raid Log Manager | |
// @include *kingdomofloathing.com/topmenu.php* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
from django import forms | |
from django.contrib.auth.forms import UserChangeForm | |
from django.contrib.auth.models import User | |
from django.core.paginator import Paginator | |
from django.shortcuts import get_object_or_404 | |
from django.utils.datastructures import SortedDict | |
import nexus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
action :append do | |
execute "cat #{new_resource.line} >>#{new_resource.path}" do | |
not_if "grep '#{new_resource.line}' #{new_resource.file}" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
import sublime | |
import sublime_plugin | |
import os | |
import subprocess | |
import threading | |
import time | |
def remove_longest_substring(s1, s2): | |
for i, (c1, c2) in enumerate(itertools.izip_longest(s1, s2)): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django import forms | |
from django.core.exceptions import ValidationError | |
from commis.api.cookbook.models import CookbookRecipe | |
from commis.api.node.models import Node | |
from commis.api.role.models import Role | |
class MultipleChoiceAnyField(forms.MultipleChoiceField): | |
"""A MultipleChoiceField with no validation.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r = gem_package "amazon-ec2" do | |
version "0.9.17" | |
end | |
r.run_action(:install) | |
require 'rubygems' | |
Gem.clear_paths | |
require 'AWS' | |
ruby_block "register_with_elb" do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# This is the template file | |
# | |
<Port <%= @port %> > | |
# bla bla bla | |
</Port> | |
# | |
# The problem is I get several files; port_80.conf port_8080.conf, ... port_8888.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install to ~/.chef/bootstrap/ubuntu10.04-gems-debug.erb and then add "-d ubuntu10.04-gems-debug" to the end of your bootstrap or server create command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "susy"; | |
$grid-info-stack: (); | |
@function _stack_push($list, $item) { | |
@return join($item, $list); | |
} | |
@function _stack_top($list) { | |
@return nth($list, 1); |