Skip to content

Instantly share code, notes, and snippets.

adservers=newDS()
permitted=newDS()
function preresolve(dq)
if permitted:check(dq.qname) or (not adservers:check(dq.qname)) then
return false
end
if(dq.qtype == pdns.A) then
dq:addAnswer(dq.qtype, "127.0.0.1")
#[macro_use]
extern crate clap;
extern crate chef;
extern crate chef_api;
extern crate serde_json;
use chef_api::api_client::*;
use chef::models::DataBagItemList;
use clap::{Arg, App};
resource_name :email_alias
property :address
property :recipients, Array
default_action :create
action :create do
with_run_context :root do
<% @aliases.keys.each do |al| -%>
<%= al %>
- <%= @aliases[al].join(",")%>
<% end -%>
@thommay
thommay / keybase.md
Created July 29, 2016 06:13
keybase.md

Keybase proof

I hereby claim:

  • I am thommay on github.
  • I am thommay (https://keybase.io/thommay) on keybase.
  • I have a public key ASBg-5tM1ZM1NQWer1AHl5lauTk37lkYmFwLOQ0wM_avkAo

To claim this, I am signing this object:

pkg = case node['platform']
when "fedora"
"foo.i586"
when "centos"
if node["platform_version"] < 6.0
"foo.i386"
else
"foo.i586"
end
end
make_dependencies(Dependencies) ->
[ begin
% Spec = iolist_to_binary(io_lib:format("~s ~s", [Match, Version])),
{[{Name, <<Match/binary, " ", Version/binary>>}]}
end || {Name, Version, Match} <- Dependencies].
/// Remove duplicate and trailing slashes from a path
fn squeeze_path(pth: String) -> String {
let mut st = String::new();
for p in pth.split('/').filter(|&x| x != "") {
st.push('/');
st.push_str(p)
}
if st.len() == 0 {
String::from("/")
} else {

Release 8.6.0

  • Phil Dibowitz:
    • Provide a new and improved filesystem plugin for Linux & Mac (filesystem2), to support CentOS7, multiple virtual filesystems, etc.
    • Fix Darwin filesystem plugin on newer MacOSX
  • Jonathan Amiez:
    • Linux filesystems plugin report wrong fs-type for logical volumes
  • involucelate
    • Fix Windows 2008 hostname truncation #554
  • Pavel Yudin:
@thommay
thommay / kitchen build instructions
Last active August 29, 2015 14:27
delivery windows builder notes

has to be a 64bit toolchain - ie by installing ruby 64 and hence the 64 bit dev toolchain OPENSSL_LIB_DIR=C:\OpenSSL-Win64 OPENSSL_INCLUDE_DIR=C:\OpenSSL-Win64\include

rust nightly via straight windows_package -

windows_package 'rust' do
  source 'https://static.rust-lang.org/dist/2015-08-17/rust-nightly-x86_64-pc-windows-gnu.msi'
end