Skip to content

Instantly share code, notes, and snippets.

@barn
barn / modem.applescript
Created February 6, 2013 16:45
Add to Viscocity/Tunnelblick before connect script. MP3 stolen from https://soundcloud.com/kpcc/dial-up-modem
do shell script "/usr/local/bin/mpg123 /Users/ben/Music/modem.mp3"
DNS configuration
resolver #1
search domain[0] : openvpn
nameserver[0] : 192.168.100.83
reach : Reachable
resolver #2
domain : local
options : mdns
@barn
barn / gist:3431489
Created August 23, 2012 02:26
My pre commit hook now spots some of my common mistakes.
[enlil:puppetlabs-modules]% git commit site.pp
Some dumbass tried to use 'requires' in site.pp
site.pp:8: requires => Exec['apt_update']
[enlil:puppetlabs-modules]% echo $?
1
# site/webserverA.pp
node 'webserverA' inherits webserver {
}
# roles/webserver.pp
node webserver {
#!/usr/bin/env ruby
#
OURCHANNEL = '#plops'
REMOTEY = 'someone@ningyo.dc1.puppetlabs.net'
def main( argv )
# Args are: whom channel channel command *args
root@tabasco:~# puppet agent -t --server ningyo.dc1.puppetlabs.net
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template mcollective/server.cfg.erb:
Filepath: /etc/puppet/environments/production/dist/mcollective/templates/server.cfg.erb
Line: 22
Detail: can't convert Symbol into String
at /etc/puppet/environments/production/dist/mcollective/manifests/server.pp:39 on node tabasco.dc1.puppetlabs.net
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
mQENBE0iIBsBCACvtLSinqw7+7JiU6bAUbZakYkmUezuFredYvP/XRIm1bP/92l/
Cq64jhw5YnE3dNYYlaxXBFN80WjJnFwkXczOl4hOx6URhAanSyaQwKw3oL//pK48
UrchMc+CIpdlikvRaes/cIpA2gc9al5OG37fkQtTojiMmn8j/Bj4DpZkDA+7xP0n
l5eqALq95hS6fNnfNRaOFcW9NZXbXrWAEaMQHVzhrFGMTYp0AF1rxXrPTYfFshHC
pqgVs+A3xXHPy4bUgfdIO6lvfm5NvawPgHuUVc98WpQK3GFb+i4275NEMX5FzyTp
xsn16o53s8E1m6ByiqVmkQVNhkxu5Xn/FvolABEBAAG0LURvbWluaWMgTWFyYWds
aWEgKDIwMTEpIDxkbWFyYWdsaWFAZ21haWwuY29tPokBOAQTAQIAIgUCTSIgGwIb
Error: A circular execution dependency (which could result in a deadlock) exists for service 'check_ping_neptune' on host 'neptune.puppetlabs.lan'!
Error: A circular execution dependency (which could result in a deadlock) exists for service 'check_ping_neptune' on host 'neptune.puppetlabs.lan'!
Error: A circular execution dependency (which could result in a deadlock) exists for service 'check_ping_neptune' on host 'neptune.puppetlabs.lan'!
Error: A circular execution dependency (which could result in a deadlock) exists for service 'check_ping_neptune' on host 'neptune.puppetlabs.lan'!
Error: A circular execution dependency (which could result in a deadlock) exists for service 'check_ssh_neptune' on host 'neptune.puppetlabs.lan'!
Error: A circular execution dependency (which could result in a deadlock) exists for service 'check_puppet_last_neptune' on host 'neptune.puppetlabs.lan'!
Error: A circular execution dependency (which could result in a deadlock) exists for service 'check_load_neptune' on host 'neptune
[root@ningyo:puppet-dashboard]# rake db:reset
(in /usr/share/puppet-dashboard)
DEPRECATION WARNING: Rake tasks in vendor/plugins/delayed_job/tasks are deprecated. Use lib/tasks instead. (called from /usr/share/puppet-dashboard/vendor/rails/railties/lib/tasks/rails.rb:10)
rake aborted!
undefined method `[]' for nil:NilClass
(See full trace by running task with --trace)
#!/bin/bash
for a in *.flac
do
OUTF=`echo "$a" | sed s/\.flac$/.mp3/g`
ARTIST=`metaflac "$a" --show-tag=ARTIST | sed s/.*=//g`
TITLE=`metaflac "$a" --show-tag=TITLE | sed s/.*=//g`
ALBUM=`metaflac "$a" --show-tag=ALBUM | sed s/.*=//g`