Skip to content

Instantly share code, notes, and snippets.

@troyready
troyready / sysctl.conf
Created June 6, 2013 19:48
Default RHEL 6.4 32bit /etc/sysctl.conf, from our 1vCPU & 2GB RAM template
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
@troyready
troyready / bacula-dir.conf
Created June 11, 2013 19:01
Default Bacula Director Configuration file on Ubuntu 12.04
#
# Default Bacula Director Configuration file
#
# The only thing that MUST be changed is to add one or more
# file or directory names in the Include directive of the
# FileSet resource.
#
# For Bacula release 5.2.5 (26 January 2012) -- ubuntu 12.04
#
# You might also want to change the default email address
@troyready
troyready / bacula-sd.conf
Created June 11, 2013 23:30
Default backup-sd.conf on Ubuntu 12.04
#
# Default Bacula Storage Daemon Configuration file
#
# For Bacula release 5.2.5 (26 January 2012) -- ubuntu 12.04
#
# You may need to change the name of your tape drive
# on the "Archive Device" directive in the Device
# resource. If you change the Name and/or the
# "Media Type" in the Device resource, please ensure
# that dird.conf has corresponding changes.
@troyready
troyready / kern.log
Created August 5, 2013 19:12
storage1 lockup, 2013-08-01
Aug 1 17:19:34 storage1 kernel: [2263513.341374] BUG: soft lockup - CPU#2 stuck for 23s! [kswapd0:84]
Aug 1 17:19:34 storage1 kernel: [2263513.341736] Modules linked in: btrfs ufs qnx4 hfsplus hfs minix ntfs msdos jfs xfs reiserfs iscsi_trgt(O) vesafb nfsd nfs lockd fscache auth_rpcgss nfs_acl sunrpc coretemp kvm_intel kvm ghash_clmulni_intel aesni_intel cryptd xt_hl ip6t_rt aes_x86_64 nf_conntrack_ipv6 nf_defrag_ipv6 ipt_REJECT xt_LOG joydev microcode ioatdma i7core_edac lpc_ich edac_core xt_limit xt_tcpudp xt_addrtype xt_state ip6table_filter ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast nf_nat_ftp nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack_ftp nf_conntrack iptable_filter mac_hid ip_tables x_tables lp parport ext2 zfs(PO) zcommon(PO) znvpair(PO) zavl(PO) zunicode(PO) spl(O) zlib_deflate ses enclosure hid_generic usbhid hid lpfc scsi_transport_fc scsi_tgt mpt2sas scsi_transport_sas raid_class bnx2x igb libcrc32c mdio dca
Aug 1 17:19:34 storage1 kernel: [2263513.341811] CPU 2
Aug 1
@troyready
troyready / gist:7268914
Created November 1, 2013 17:34
chef-client expanded run list example
troyr1@a012625:~$ sudo chef-client
[2013-11-01T10:31:34-07:00] INFO: Forking chef instance to converge...
Starting Chef Client, version 11.6.0
[2013-11-01T10:31:34-07:00] INFO: *** Chef 11.6.0 ***
[2013-11-01T10:31:36-07:00] INFO: Run List is [role[companyworkstation]]
[2013-11-01T10:31:36-07:00] INFO: Run List expands to [chef-client::delete_validation, chef-client::config, chef-client::service, apt::default, users::sysadmins, sudo, unity_desktop, unity_desktop::myusername, vim, unity_desktop::apt_proxy]
@troyready
troyready / digits_dots.c
Created February 6, 2015 19:56
glibc v2.3.2
/* Copyright (C) 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by H.J. Lu <[email protected]>, 1997.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
@troyready
troyready / gist:1f4711497fe443096296
Created March 24, 2015 21:47
chef-client 12.1 rbenv gem chef client error
* rbenv_script[rbenv install 2.1.4 (roz)] action run
- execute "bash" "/tmp/chef-script20150324-1467-mnijjj"
* apt_package[build-essential] action nothing (skipped due to action :nothing)
* apt_package[bison] action nothing (skipped due to action :nothing)
* apt_package[openssl] action nothing (skipped due to action :nothing)
* apt_package[libreadline6] action nothing (skipped due to action :nothing)
* apt_package[libreadline6-dev] action nothing (skipped due to action :nothing)
@troyready
troyready / gist:b732eb4835f53f528dea
Created March 24, 2015 21:51
chef-client 12.1 rbenv gem chef client stacktrace
Generated at 2015-03-24 21:43:45 +0000
Chef::Exceptions::ValidationFailed: rbenv_gem[2.1.4::bundler (roz)] (roz) (apps-deployment::roz line 75) had an error: Chef::Exceptions::ValidationFailed: Option name must be a kind of String! You passed <rbenv_gem[2.1.4::bundler (roz)] (roz) @name: "bundler (roz)" @noop: nil @before: nil @params: {:app_source=>"https://github.com/biola/roz.git", :app_rev=>"37d3038a9c7bb715df2809bb85493cbdc51156c0", :app_name=>"roz", :app_dir=>"/srv/rack/roz", :owner=>"roz", :ruby_ver=>"2.1.4", :name=>"https://github.com/biola/roz.git"} @provider: Chef::Provider::Package::RbenvRubygems @allowed_actions: [:nothing, :install, :upgrade, :remove, :purge] @action: :install @updated: false @updated_by_last_action: false @supports: {} @ignore_failure: false @retries: 0 @retry_delay: 2 @source_line: "/tmp/kitchen/cache/cookbooks/blitzkrieg/definitions/app.rb:75:in `block (2 levels) in from_file'" @guard_interpreter: nil @default_guard_interpreter: :default @elapsed_time: 0 @sensitive: false @re
@troyready
troyready / gist:8481b641d98ec37f9efb
Created March 24, 2015 21:53
chef-client 12.1 rbenv gem chef client recipe
include_recipe 'ruby_build'
include_recipe 'rbenv::user_install'
# Setup rbenv for app owner
git_url = node['rbenv']['git_url']
git_ref = node['rbenv']['git_ref']
home_dir = "/home/#{params[:owner]}"
rbenv_prefix = ::File.join(home_dir, '.rbenv')
install_or_upgrade_rbenv :rbenv_prefix => rbenv_prefix,
:home_dir => home_dir,
@troyready
troyready / snap_all_nimble_vols.rb
Last active August 29, 2015 14:18
Script to snapshot (or purge) snapshots for all Nimble storage volumes
#!/bin/env ruby
require 'net/http'
if ARGV[0].nil?
puts 'Nimble hostname required, e.g.:'
puts 'snap_all_nimble_vols mysan.local'
puts ''
fail
else