Skip to content

Instantly share code, notes, and snippets.

View brandt's full-sized avatar

J. Brandt Buckley brandt

  • Twilio
  • Denver, CO
View GitHub Profile
@brandt
brandt / rubocop-limited.yml
Created March 26, 2015 18:05
Limited subset of Rubocop auto-correct rules enabled
# Type 'Lint' (36):
# Supports --auto-correct
Lint/BlockAlignment:
Description: Align block ends correctly.
Enabled: false
# Supports --auto-correct
Lint/DeprecatedClassMethods:
Description: Check for deprecated class method calls.
@brandt
brandt / centos-6.log
Created May 11, 2015 09:31
osquery missing library "libcryptsetup" demonstration and fix in Docker
root@osquery-docker-test:~# docker run --rm -it centos:centos6 /bin/bash
[root@b1a7318dbf3c /]# rpm -ivh https://osquery-packages.s3.amazonaws.com/centos6/noarch/osquery-s3-centos6-repo-1-0.0.noarch.rpm
Retrieving https://osquery-packages.s3.amazonaws.com/centos6/noarch/osquery-s3-centos6-repo-1-0.0.noarch.rpm
warning: /var/tmp/rpm-tmp.TSTQpe: Header V4 RSA/SHA1 Signature, key ID c9d8b80b: NOKEY
Preparing... ########################################### [100%]
1:osquery-s3-centos6-repo########################################### [100%]
[root@b1a7318dbf3c /]# yum install osquery
Loaded plugins: fastestmirror
Setting up Install Process
base | 3.7 kB 00:00
# Install this with:
#
# mkdir -p ~/.chef/plugins/knife
# curl <this_raw_file> > ~/.chef/plugins/knife/solve.rb
#
# Copyright 2014, Noah Kantrowitz
# Copyright 2015, J. Brandt Buckley
#
# Licensed under the Apache License, Version 2.0 (the "License");
From 6af58eebeee72ed4c5a5816a6ae64eca280d8fc6 Mon Sep 17 00:00:00 2001
Message-Id: <6af58eebeee72ed4c5a5816a6ae64eca280d8fc6.1357740563.git.jdenemar@redhat.com>
From: Michal Privoznik <[email protected]>
Date: Tue, 8 Jan 2013 18:22:01 +0100
Subject: [PATCH] qemu: Relax hard RSS limit
https://bugzilla.redhat.com/show_bug.cgi?id=891653
Currently, if there's no hard memory limit defined for a domain,
libvirt tries to calculate one, based on domain definition and magic
From ea988d07c0d3ffb4a36102c71e859d75143a0829 Mon Sep 17 00:00:00 2001
Message-Id: <ea988d07c0d3ffb4a36102c71e859d75143a0829.1380730269.git.jdenemar@redhat.com>
From: Michal Privoznik <[email protected]>
Date: Mon, 30 Sep 2013 20:14:53 +0200
Subject: [PATCH] qemu: Drop qemuDomainMemoryLimit
https://bugzilla.redhat.com/show_bug.cgi?id=1013758
This function is to guess the correct limit for maximal memory
usage by qemu for given domain. This can never be guessed
@brandt
brandt / chef-expander-role-promotion-bug-demonstration.rb
Last active September 14, 2020 21:09
Demonstration of a bug where a node is incorrectly indexed as having a role that it does not
#!/usr/bin/env ruby
# POC for: https://github.com/chef/chef-server/issues/718
# Demonstration of a bug where a node is incorrectly indexed as having a role that it does not.
#
# 1. chef-expander munges and flattens the node hash
#
# 2. if the node has "role" as a nested keys, it will be promoted and merged with the top
#
@brandt
brandt / CHANGELOG.txt
Last active February 23, 2016 19:26
Changes in RHEL/CentOS from glibc-2.12-1.149 glibc-2.12-1.166
glibc-2.12-1.166.el6_7.7.i686 updates
* Thu Jan 28 12:00:00 2016 Carlos O'Donell <[email protected]> - 2.12-1.166.7
- Update fix for CVE-2015-7547 (#1296028).
* Mon Jan 25 12:00:00 2016 Carlos O'Donell <[email protected]> - 2.12-1.166.6
- Create helper threads with enough stack for POSIX AIO and timers (#1301625).
* Thu Jan 14 12:00:00 2016 Carlos O'Donell <[email protected]> - 2.12-1.166.5
- Fix CVE-2015-7547: getaddrinfo() stack-based buffer overflow (#1296028).
@brandt
brandt / CHANGELOG.txt
Last active February 24, 2016 18:43
Changes in RHEL/CentOS from glibc-2.12-1.132 glibc-2.12-1.149
* Tue Aug 26 2014 Siddhesh Poyarekar <[email protected]> - 2.12-1.149
- Remove gconv transliteration loadable modules support (CVE-2014-5119,
#1133810).
- _nl_find_locale: Improve handling of crafted locale names (CVE-2014-0475,
#1133810).
* Wed Jul 30 2014 Siddhesh Poyarekar <[email protected]> - 2.12-1.148
- Switch gettimeofday from INTUSE to libc_hidden_proto (#1099025).
* Fri Jun 20 2014 Siddhesh Poyarekar <[email protected]> - 2.12-1.147
#!/bin/bash
#
# Copyright (c) 2014, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
@brandt
brandt / birthdays_by_index.json
Created March 14, 2016 15:04
Where the last 150 years of birthdays occur in Pi
This file has been truncated, but you can view the full file.
{
"9982546": [
"1960-11-23"
],
"9695244": [
"1944-11-23"
],
"7812514": [
"2013-10-29",
"1913-10-29"