Skip to content

Instantly share code, notes, and snippets.

View hunner's full-sized avatar

Hunter Haugen hunner

View GitHub Profile
(gdb) print Window->Application->Name
$4 = {<std::__1::__basic_string_common<true>> = {<No data fields>},
__r_ = {<std::__1::__libcpp_compressed_pair_imp<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__rep, std::__1::allocator<char>, 2>> = {<std::__1::allocator<char>> = {<No data fields>}, __first_ = {{__l = {__cap_ = 29680635209667340, __size_ = 0,
__data_ = 0x0}, __s = {{__size_ = 12 '\f', __lx = 12 '\f'},
__data_ = "Safari", '\000' <repeats 16 times>}, __r = {__words = {29680635209667340,
0, 0}}}}}, <No data fields>}, static npos = 18446744073709551615}
@hunner
hunner / transition.txt.asc
Created May 7, 2016 04:56
OpenPGP transition statement
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1,SHA512
Sat May 7 04:34:52 UTC 2016
I've recently set up a new OpenPGP key and will be transitioning away from my
old one.
The old key will be valid for a little while, but I prefer all future
correspondence to use the new one. I would also like this new key to be
HOSTS:
genericnode:
roles:
- default
platform: el-7-x86_64
hypervisor: none
ip: 127.0.0.1
CONFIG:
type: foss
set_env: false
HOSTS:
ubuntu-1404-x64-master:
roles:
- master
- agent
- dashboard
- database
platform: ubuntu-1404-x86_64
hypervisor: vagrant
box: puppetlabs/ubuntu-14.04-64-nocm
@hunner
hunner / openpilot to cleanflight
Last active February 12, 2016 22:17
Custom motor mappings
mixer custom
mmix reset
mmix 0 1 1 -1 -1
mmix 1 1 -1 -1 1
mmix 2 1 -1 1 -1
mmix 3 1 1 1 1
require 'spec_helper_acceptance'
describe 'ntp class' do
it "applies idempotently" do
pp = "class { 'ntp': }"
apply_manifest(pp, :catch_failures => true)
apply_manifest(pp, :catch_changes => true)
end
describe file("/etc/ntp.conf") do
it { should be_file }
@hunner
hunner / Vagrantfile
Last active December 30, 2015 07:09
PE3 vagrantfile
# Download PE tarball, extract to the same location as the Vagrantfile and mv
# to a directory called 'pe37'. Place a PE3 answers file called 'answers.txt'
# in the same location as the Vagrantfile (you can steal the
# all-in-one.answers.txt from the installer's answers/ directory). Run `vagrant
# up` and wait for PE to install. Visit https://localhost:4443 to view the PE
# console.
Vagrant.configure("2") do |config|
config.vm.define 'master' do |node|
node.vm.box = "puppetlabs/ubuntu-14.04-64-nocm"
node.vm.hostname = 'master.localdomain'
[2] pry(main)> require 'facter'
=> true
[3] pry(main)> Facter.value(:manufacturer)
=> nil
[4] pry(main)> Facter.fact(:manufacturer).stubs(:value).returns("aoeu") ; Facter.value(:manufacturer)
Mocha::StubbingError: stubbing method on nil: nil.value
from (pry):4:in `__pry__'
[5] pry(main)> Facter.add(:manufacturer) do "snth" end ; Facter.fact(:manufacturer).stubs(:value).returns("aoeu") ; Facter.value(:manufacturer)
=> "aoeu"
[6] pry(main)>
@hunner
hunner / vvagrant README
Last active December 17, 2015 13:19
`vvagrant` command which reads an environment variable `$VAGRANT_VERSION` (or command argument) to determine which version of vagrant to use. Useful for having both 1.0.x and 1.2.x installed at the same time.
## Make a directory like this for each version you want
vv% ls -l ~/local/share/rbenv/gemsets
total 0
drwxr-xr-x 8 hunner staff 272 Apr 22 15:06 vagrant_1.0.7/
drwxr-xr-x 8 hunner staff 272 Apr 22 15:12 vagrant_1.2.2/
## Put this in vagrant_*/Gemfile
vv% cat vagrant_1.2.1/Gemfile
source 'https://rubygems.org'
gem 'vagrant', :path => File.expand_path('vagrant', File.dirname(__FILE__))
@hunner
hunner / revoke_cert.rb
Created May 1, 2013 19:49
Revoke puppet certificates on first unchanged run
## modules/revoke_cert/lib/reports/revoke_cert.rb
require 'puppet/face'
Puppet::Reports.register_report(:revoke_cert) do
def process
if self.status == 'unchanged'
Puppet::Face[:certificate, :current].destroy(self.host,{:ca_location => :local})
end
end
end