Skip to content

Instantly share code, notes, and snippets.

View mburns's full-sized avatar

Michael Burns mburns

View GitHub Profile
@mburns
mburns / gist:6316320
Created August 23, 2013 07:02
Create a file (in puppet and chef) from a local source.
# puppet
file { "/etc/lvm.conf":
ensure => present,
source => "puppet:///modules/ganeti/lvm.conf",
}
# chef
cookbook_file '/etc/lvm.conf' do
source 'lvm.conf'
end
@mburns
mburns / gist:6559845
Created September 14, 2013 08:08
POSIX is dead, long live LSB.
# ./configure
* Detecting system configuration
Bash: 4.1.0(1)-release
Operating System: SunOS
OS Version: SunOS 5.11 i86pc
* Error: unsupported operating system: SunOS
* Aborting configure
@mburns
mburns / gist:6619422
Created September 19, 2013 05:28
./configure of Suricata 2.0beta1 on SmartOS
mburns@dev-01::(SunOS)~/suricata-2.0beta1 $ uname -a
SunOS dev-01.local 5.11 joyent_20120912T055050Z i86pc i386 i86pc Solaris
mburns@dev-01::(SunOS)~/suricata-2.0beta1 $ ./configure
checking for a BSD-compatible install... /opt/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /opt/local/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc

Keybase proof

I hereby claim:

  • I am mburns on github.
  • I am mburns (https://keybase.io/mburns) on keybase.
  • I have a public key whose fingerprint is EBA4 2C8B CD85 3531 915C 85B6 33CA 3C72 807A 02A4

To claim this, I am signing this object:

{
"normal": {
"java": {
"install_flavor": "openjdk"
}
},
"run_list": [
"role[dev]"
]
}
description "newznab"
start on runlevel [2345]
stop on stopping networking or runlevel [016]
console log
respawn
respawn limit 10 5
setuid newznab
@mburns
mburns / gist:c32dc969796efa9abe82
Created January 4, 2016 19:44
nagios plugin for treslek
#
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@mburns
mburns / gist:b11a6c8a61887e5f9a4a8fa65fd98883
Created May 29, 2016 08:55
rubocop auto_correct failure
-nodes.select { |x| x.has_key?(:services) and not x[:services].to_a.empty? }.each do |n|
+nodes.select { |x| x.has_key?(:services) and notx[:services].to_a.empty? }.each do |n|
@mburns
mburns / clean-up-boot-partition-ubuntu.md
Created January 15, 2018 07:22 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@mburns
mburns / conf_d_default_conf
Last active September 15, 2020 11:36
There is a top-level `nginx.conf` and then in `conf.d`, we have a `default.conf` for HTTP and a `gateway.conf` for HTTPS. Removed some stanzas about domain-specific redirects and legacy rewrite rules.
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'X-Requested-With, Range, Content-Range, X-Chunked-Output, X-Stream-Output' always;
add_header 'Access-Control-Expose-Headers' 'Content-Range, X-Chunked-Output, X-Stream-Output' always;