Skip to content

Instantly share code, notes, and snippets.

@eedgar
eedgar / gist:cabbb43949ce3811a388
Created May 22, 2014 20:19
vmware fusion backups
IFS=$'\n'
RUNNING_VMS=`/Applications/VMware\ Fusion.app/Contents/Library/vmrun list|sed '1d'`
for vm in $RUNNING_VMS
do
echo $vm
echo suspending $vm
`/Applications/VMware\ Fusion.app/Contents/Library/vmrun suspend "$vm"`
done
rsync -Cavz --stats --progress "/Users/eedgar/Documents/Virtual Machines.localized" /Volumes/Data\:Backups/
#!/bin/bash
##############################################################################
#
# Copyright (C) Zenoss, Inc. 2007, all rights reserved.
#
# This content is made available according to terms specified in
# License.zenoss under the directory where your Zenoss product is installed.
#
##############################################################################
@eedgar
eedgar / gist:563f2612cd5899be9b85
Created October 2, 2014 19:54
freebsd 8.3 bash upgrade
cd /usr/ports/shells/bash
update the Makefile
PATCHLEVEL= 15
run make makesum
make deinstall
make reinstall
@eedgar
eedgar / gpg_publickey.txt
Created December 17, 2014 16:18
gpg pubkey
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQHhBFSRplYBDqCeBPwMbUjcMDfY//JKeam3eMFEtr5DY25UfsxWQNZTTkMGXmUK
T+uY1FFCbTVDYBbH8qNM5P/5DjUZ1ezEYW1RuumsjsMGDjhs2b0UBiJdwcNNAJ7y
pP2pbh61z0a8W2UooanFPH38fOHOQa2BjuNW3WurniGKemxUXkl433QTbIAznyhN
83lQ1/ki72z/3pR6uUtOmktQQg86akUwu5fSRIvWwKlb3IXIL2EoD2zU3o+vVA08
OgypCnuQpBb9Xhs7DfrSB2coif6+rvTsyPMQRyoqN7AM5lzq/xJjENmm7afrdais
JCD6zdwJo2fyrz/Z3HLLygGVnpd9TOycKmbUsK5QFBbrEvvrvLBKBd0yflqVVfCu
sXPat15BO9N2JqiOE22A2RkjB3UvDmHvh6oYJ/3wofo+XSzQ4diTjRbkItTkwaJ4
from Products.ZenMessaging.audit import audit
auditData = {
'TransactionId': newId,
'uid': uid,
'url': url,
'user': user,
'realm': realm,
'data': something_custom,
'agent': agent,
fileserver_backend:
- git
- roots
gitfs_provider: gitpython
gitfs_remotes:
- git+ssh://eedgar@enas.familyds.com/volume1/git/rephunter-saltmaster-dev.git
- https://github.com/eedgar/users-formula.git
- https://github.com/eedgar/salt-formula.git
ext_pillar:
private_network{"ip"=>"192.168.20.3"}/opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/kernel_v2/config/vm.rb:226:in `network': wrong number of arguments (2 for 1) (ArgumentError)
from /home/eedgar/git/vagrant/Vagrantfile:80:in `block (4 levels) in <top (required)>'
from /home/eedgar/git/vagrant/Vagrantfile:77:in `each'
from /home/eedgar/git/vagrant/Vagrantfile:77:in `block (3 levels) in <top (required)>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/v2/loader.rb:37:in `call'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/v2/loader.rb:37:in `load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:103:in `block (2 levels) in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:97:in `each'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:97:in `block in load'
from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:94:in `each'
@eedgar
eedgar / netconf.py
Last active August 29, 2015 14:26 — forked from simon-engledew/netconf.py
snack based ncurses script for configuring ubuntu networking, first pass
from __future__ import with_statement
import snack, ipaddr, optparse, re, shlex
parser = optparse.OptionParser()
parser.add_option('--no-cancel', action='store_true', dest='no_cancel', help='Do not display a cancel button')
parser.add_option('--title', action='store', dest='title', default='Configure Networking', help='set the form title')
parser.add_option('--interface', action='store', dest='interface', default='eth0', help='interface to edit')
parser.add_option('--interfaces-file', action='store', dest='interfaces_file', default='/etc/network/interfaces', help='target interfaces file to edit')
parser.add_option('--dns-file', action='store', dest='dns_file', default='/etc/resolvconf/resolv.conf.d/base', help='target dns file to edit')
@eedgar
eedgar / gist:9f898808242625a863b1
Created August 19, 2015 03:00
zenoss 5.0.5 zentrap fix
A temporary fix for this until the 5.0.6 release is to download the attached pynetsnmp package (or grab it from http://zenpip.zendev.org/packages/pynetsnmp-0.40.0.tar.gz), extract it to somewhere (in this case it was /home/rmatte), rename the extracted directory to pynetsnmp, then do...
mkdir /tmp/zentrap_fix and copy the files into there.
[root@zenoss5lab rmatte]# serviced service shell --mount '/tmp/zentrap_fix,/pynetsnmp' -i -s mychange zentrap bash
[root@bfbd8ee175c2 pynetsnmp]# cd /opt/zenoss/lib/python2.7/site-packages/
[root@bfbd8ee175c2 site-packages]# mv pynetsnmp /tmp
[root@bfbd8ee175c2 site-packages]# mv /pynetsnmp/pynetsnmp .
[root@bfbd8ee175c2 site-packages]# chown zenoss:zenoss pynetsnmp
[root@bfbd8ee175c2 ~]# exit
[root@zenoss5lab rmatte]# serviced snapshot commit mychange
#!/bin/bash
config_file='/agentportal/instance/setup.txt'
if [ ! -e ${config_file} ];
then
echo "Running fresh install"
NOTSET=0
portalpath={{getContext . "portalpath_host"}}
portalpass={{getContext . "portalpass"}}
zenosshost={{getContext . "zenoss_host"}}