Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Klang bklang

View GitHub Profile
View refresh-unifi-certs.sh
#!/usr/bin/env bash
# LetsEncrypt certbot refresh hook for Unifi and Unifi Video
# Place this into /etc/letsencrypt/renewal-hooks/post/ and make it executable
# Inspired by script from here: https://source.sosdg.org/brielle/lets-encrypt-scripts
# Author: Ben Klang <bklang@wirehack.net>
MAINDOMAIN="REPLACE.ME.WITH.YOUR.DOMAIN.com"
set -e
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
View gist:f702db1359e6dd61b0f0
Aug 25 09:28:09 talkbox puppet-agent[25335]: Could not retrieve catalog from remote server: SSL_CTX_use_PrivateKey:: key values mismatch
Aug 25 09:28:10 talkbox puppet-agent[25335]: Using cached catalog
Aug 25 09:28:11 talkbox puppet-agent[25335]: (/Stage[main]/Puppet_enterprise::Mcollective::Server::Plugins/File[/opt/puppet/libexec/mcollective/mcollective]) Failed to generate additional resources using 'eval_generate': SSL_CTX_use_PrivateKey:: key values mismatch
Aug 25 09:28:11 talkbox puppet-agent[25335]: (/Stage[main]/Puppet_enterprise::Mcollective::Server::Plugins/File[/opt/puppet/libexec/mcollective/mcollective]) Could not evaluate: Could not retrieve file metadata for puppet:///modules/puppet_enterprise/mcollective/plugins: SSL_CTX_use_PrivateKey:: key values mismatch
Aug 25 09:28:11 talkbox puppet-agent[25335]: (/Stage[main]/Puppet_enterprise::Mcollective::Server::Plugins/File[/opt/puppet/libexec/mcollective/mcollective]) Wrapped exception:
Aug 25 09:28:11 talkbox puppet-agent[25335]: (/Stage[main]/Pu
View gist:d2e0c697e8f7aa8036f1
2015-08-11 15:12:49.581 [error] <0.450.0> shrinking table:
** Table: shared_roster_ldap_user
** Processes Number: 2
** Max Size: 500 items
** Shrink Size: 250 items
** Life Time: 300000000 microseconds
** Hits/Miss: 0/501
** Owner: <0.449.0>
** Cache Missed: true
** Instruction: you have to tune cacheing options if this message repeats too frequently
View gist:0fe660998952c0abd0cf
$ bundle exec rails c
/Users/bklang/.rvm/gems/ruby-2.2.2/gems/simple_form-2.1.1/lib/simple_form/inputs/boolean_input.rb:37: warning: circular argument reference - unchecked_value
/Users/bklang/.rvm/gems/ruby-2.2.2/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `require': Please add test-unit gem to your Gemfile: `gem 'test-unit', '~> 3.0'` (cannot load such file -- test/unit/testcase) (LoadError)
from /Users/bklang/.rvm/gems/ruby-2.2.2/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `block in require'
from /Users/bklang/.rvm/gems/ruby-2.2.2/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:236:in `load_dependency'
from /Users/bklang/.rvm/gems/ruby-2.2.2/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in `require'
from /Users/bklang/.rvm/gems/ruby-2.2.2/gems/activesupport-3.2.22/lib/active_support/test_case.rb:2:in `<top (required)>'
from /Users/bklang/.rvm/gems/ruby-2.2.2/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251
View gist:d1008221284e84f89023
<--- SIP read from UDP:10.0.6.10:5060 --->
INVITE sip:4844822491@172.16.0.91:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.6.10:5060;branch=z9hG4bK+12d2008887f7efe60dc554f153b1fa081+sip+1+abb39a4d
Call-ID: 0gQAAC8WAAACBAAALxYAAI219+Ir22X1U8NN/ElfnxhITVfFXwBT5YQPGAj3eVHe@10.0.6.10
From: "ATLANTA GA" <sip:4044754849@10.0.2.100:5060>;tag=10.0.6.10+1+f49fc6d3+b569a8ea;isup-oli=00
To: <sip:4844822491@172.16.0.91>;tag=as0f4fc7a5
CSeq: 814716068 INVITE
Expires: 180
Content-Length: 167
Call-Info: <sip:10.0.6.10:5060>;method="NOTIFY;Event=telephone-event;Duration=2000"
View gist:452e729bcb4d64dc3f59
<--- SIP read from UDP:10.0.6.10:5060 --->
INVITE sip:4844822491@172.16.0.91:5060 SIP/2.0
Via: SIP/2.0/UDP 10.0.6.10:5060;branch=z9hG4bK+12d2008887f7efe60dc554f153b1fa081+sip+1+abb39a4d
Call-ID: 0gQAAC8WAAACBAAALxYAAI219+Ir22X1U8NN/ElfnxhITVfFXwBT5YQPGAj3eVHe@10.0.6.10
From: "ATLANTA GA" <sip:4044754849@10.0.2.100:5060>;tag=10.0.6.10+1+f49fc6d3+b569a8ea;isup-oli=00
To: <sip:4844822491@172.16.0.91>;tag=as0f4fc7a5
CSeq: 814716068 INVITE
Expires: 180
Content-Length: 167
Call-Info: <sip:10.0.6.10:5060>;method="NOTIFY;Event=telephone-event;Duration=2000"
@bklang
bklang / gist:e44cb18c8b5d577f5699
Last active Aug 29, 2015
Adhearsion GSoC Announcement
View gist:e44cb18c8b5d577f5699
Hello everyone,
I'm very excited to be able to announce that, for the first time ever, Adhearsion will be participating in the Google Summer of Code! More specifically, Google has accepted the application from a consortium of open source Ruby projects, which include such distinguished company as Celluloid, Bundler, Rake, and even MRI and JRuby themselves.
We in the Adhearsion community have come up with a list of ideas for students interested in participating, and are willing to provide mentorship for anyone who is interested. Now all we need are motivated students who want to get their hands dirty with an exciting and unique Open Source project.
Are you a current college student? Do you know one who has an interest in furthering THE state-of-the-art, Open Source communications application framework? Apply today! Some links:
* To learn more about Google Summer of Code in general: http://www.google-melange.com/gsoc/homepage/google/gsoc2015
* To see the list of GSoC ideas for Adhearsion: http://www.adhea
View gist:2d1f88aa040ad052ef5f
$ vagrant provision nitro
nitro: The Berkshelf shelf is at "/Users/bklang/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150306-88714-1h3ik84-nitro"
==> nitro: Installing Puppet modules with Librarian-Puppet...
==> nitro: Running provisioner: puppet...
==> nitro: Running Puppet with nitro.pp...
==> nitro: stdin: is not a tty
==> nitro: Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
==> nitro: (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1117:in `issue_deprecation_warning')
==> nitro: Warning: The use of 'import' is deprecated at /tmp/vagrant-puppet/manifests-97e772fe161f2f461003ca850295f8ad/nitro.pp:3. See http://links.puppetlabs.com/puppet-import-deprecation
==> nitro: (at /usr/lib/ruby/vendor_ruby/puppet/parser/parser_support.rb:110:in `import')
View gist:f9dcb4e45cc2df512e03
$ vagrant provision nitro
nitro: The Berkshelf shelf is at "/Users/bklang/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150306-88714-1h3ik84-nitro"
==> nitro: Installing Puppet modules with Librarian-Puppet...
==> nitro: Running provisioner: puppet...
==> nitro: Running Puppet with nitro.pp...
==> nitro: stdin: is not a tty
==> nitro: Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations
==> nitro: (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1117:in `issue_deprecation_warning')
==> nitro: Warning: The use of 'import' is deprecated at /tmp/vagrant-puppet/manifests-97e772fe161f2f461003ca850295f8ad/nitro.pp:3. See http://links.puppetlabs.com/puppet-import-deprecation
==> nitro: (at /usr/lib/ruby/vendor_ruby/puppet/parser/parser_support.rb:110:in `import')
View gist:adfcc2fa3d1db2223d7e
$ vagrant up nitro
Bringing machine 'nitro' up with 'virtualbox' provider...
nitro: The Berkshelf shelf is at "/Users/bklang/.berkshelf/vagrant-berkshelf/shelves/berkshelf20150306-86526-17dm52f-nitro"
==> nitro: Importing base box 'puppetlabs/ubuntu-14.04-64-puppet'...
==> nitro: Matching MAC address for NAT networking...
==> nitro: Checking if box 'puppetlabs/ubuntu-14.04-64-puppet' is up to date...
==> nitro: A newer version of the box 'puppetlabs/ubuntu-14.04-64-puppet' is available! You currently
==> nitro: have version '1.0.0'. The latest is version '1.0.1'. Run
==> nitro: `vagrant box update` to update.
==> nitro: Setting the name of the VM: PHRG-Devbox-Nitro