Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block dpetzel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dpetzel /
Last active Nov 28, 2019


from django.forms.widgets import NullBooleanSelect
from django.db import models
from django import forms

from django_filters.filters import BooleanFilter
from django_filters.filterset import FilterSet

from rest_framework.filters import DjangoFilterBackend
View gist:c48b2256dfce407adb15
Here is what I'm seeing in the logs:
2014/11/05 14:20:49 [INFO] serf: EventMemberJoin: i-dbbe4bd7
2014/11/05 14:21:00 [INFO] serf: EventMemberFailed: i-dbbe4bd7
And here is a tcpdump snippet (some internal info redacted):
14:20:45.168346 IP ip-88.1024 > ip-177.8934: UDP, length 240
14:20:48.968555 IP ip-88.1024 > ip-177.8934: UDP, length 53
View gist:5d170f4328f08b1d09a5
set node=remote_pc_name
sc \\%node% start RemoteRegistry
reg add "\\%node%\HKLM\System\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /d 0 /f
View gist:9572935
cat /etc/rundeck/jaas-activedirectory.conf
activedirectory {
com.dtolabs.rundeck.jetty.jaas.JettyCachingLdapLoginModule sufficient
dpetzel / gist:7268979
Created Nov 1, 2013
minitest-handler gem install debug
View gist:7268979
# /opt/chef/embedded/bin/gem install minitest-chef-handler --debug
Exception `NameError' at /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/command_manager.rb:177 - uninitialized constant Gem::Commands::InstallCommand
Exception `Errno::EAGAIN' at /opt/chef/embedded/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /opt/chef/embedded/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /opt/chef/embedded/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /opt/chef/embedded/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /opt/chef/embedded/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailable - read would block
Exception `Errno::EAGAIN' at /opt/chef/embedded/lib/ruby/1.9.1/net/protocol.rb:141 - Resource temporarily unavailab
dpetzel / gist:7268621
Last active Dec 27, 2015
minitest-chef-handler/puma whoas
View gist:7268621
# Full debug output:
# /opt/chef/bin/chef-client --version
Chef: 10.26.0
# /opt/chef/embedded/bin/gem install minitest-chef-handler
Fetching: mixlib-config-2.0.0.gem (100%)
Fetching: mixlib-shellout-1.2.0.gem (100%)
Fetching: diff-lcs-1.2.4.gem (100%)
dpetzel / gist:5985192
Created Jul 12, 2013
4.2.4 zenpack wonkiness
View gist:5985192
[root@mynode zenoss-core-autodeploy-5c534bc]# cat zenpack_actions.txt
View gist:5885644
153: def ssh(ssh_args, cmd)
=> 154: binding.pry
155: env = "env"
156: if config[:http_proxy]
157: env << " http_proxy=#{config[:http_proxy]}"
158: end
159: if config[:https_proxy]
160: env << " https_proxy=#{config[:https_proxy]}"
161: end
162: if env != "env"
dpetzel / gist:5758291
Last active Dec 18, 2015
View gist:5758291
# Assume your Event was "MyCoolApp Tossed An Error"
import re
if getattr(evt, "datasourceId", None) is not None:
# Start with any characters up to the first space. Save the capture as variable named app_name
re_string = "^(?P<app_name>.*?)\s.*?"
m =, evt.datasourceId)
if m and'app_name'):
app_name ='app_name')
# Now set the component equal to the app name
evt.component = app_name
dpetzel / gist:5732361
Last active Dec 18, 2015
Job failure when using cascading rundeck job options
View gist:5732361
01:51:36 [me@localhost ][CONFIG] [workflow] Begin execution: rundeck-workflow-node-first context: null
01:51:36 [me@localhost ][CONFIG] preparing for sequential execution on 1 nodes
01:51:36 [me@localhost ][CONFIG] Executing command on node: MyNode, NodeEntryImpl{tags=[mytaglist], attributes={my_attributes}, project='null'}
01:51:36 [me@localhost ][CONFIG] NodeSet: MultiNodeSelector{nodenames=[MyNode]}
01:51:36 [me@localhost ][CONFIG] Workflow: com.dtolabs.rundeck.core.execution.workflow.StepFirstWorkflowStrategy$stepFirstWrapper@677ef089
01:51:36 [me@localhost ][CONFIG] data context: {node={my)_tags}, job={id=14a69b44-6b9d-466c-8f7f-36a8919953fc, project=MyProject, loglevel=DEBUG, username=me,, name=MyJob, group=MyGroup, execid=127}, option={service_name=MyService, another_option=no, node_name=MyNode}}
01:51:36 [@ 1-NodeDispatch-exec][CONFIG] [workflow] Begin step: 1,NodeDispatch
01:51:36 [@ 1-NodeDispatch-exec][CONFIG] 1: Workflow step executing: com.dtolabs.rundeck.execution.ExecutionI
You can’t perform that action at this time.