Instantly share code, notes, and snippets.

View zmqc.py
#!/usr/bin/env python
# zmqc: a small but powerful command-line interface to ZMQ.
## Usage:
# zmqc [-0] (-r | -w) (-b | -c) SOCK_TYPE [-o SOCK_OPT=VALUE...] address [address ...]
## Examples:
# zmqc -rc SUB 'tcp://127.0.0.1:5000'
#
# Subscribe to 'tcp://127.0.0.1:5000', reading messages from it and printing
View Jenkins log junk
jenkins@262ab9ca8188:~$ cat /var/jenkins_home/jobs/sp5/builds/lastSuccessfulBuild/log
Started by user ha:////4Jpcr/X34kkFa1LJmm2G9KXB1L1WheZdc1X2LQcAaOdkAAAAkx+LCAAAAAAAAP9b85aBtbiIQTGjNKU4P08vOT+vOD8nVc83PyU1x6OyILUoJzMv2y+/JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ+sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAyWEgYu/dLi1CIwAQDYegtJvwAAAA==user
ha:////4Nmt1g6VaeGWaoFYM8BlPNZa3OQrz3+9nCOsEwCsBWgAAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8rzs9J1QuHCgaV5jlDhPzyS1IZIICRiYGhoohBKqM0pTg/D64Hh8ICAFt0h+h/AAAA[Pipeline] node
Running on ha:////4BXp8Ewt625iB5X2lh9SCueG2uNgVhVB2qGvn+yzfJ34AAAAnh+LCAAAAAAAAP9b85aBtbiIQTGjNKU4P08vOT+vOD8nVc83PyU1x6OyILUoJzMv2y+/JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ+sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAz2EgZh/eT83ILSktQifY3cxGIgrakPAHib2iPIAAAAJenkins in /var/jenkins_home/workspace/sp5
ha:////4Nmt1g6VaeGWaoFYM8BlPNZa3OQrz3+9nCOsEwCsBWgAAAAAaB+LCAAAAAAAAP9b85aBtbiIwTG/KF0vKzUvOzOvODlTryCnNB3I0ivPL8pOy8kv18vKT9JLzs8
View gist:4a08c38481dee2be21771e4b93e75360
jenkins@262ab9ca8188:~$ cat jobs/fs1/lastSuccessful/log
Started by user ha:////4FFD7kqDq3PEd4KrNcxLWftjfAKO9ut1GXZL0WdNuBebAAAAlh+LCAAAAAAAAP9b85aBtbiIQTGjNKU4P08vOT+vOD8nVc83PyU1x6OyILUoJzMv2y+/JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ+sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAyWEgYu/dLi1CL9jNL0DADQEqEgvwAAAA==hugh
Building in workspace /var/jenkins_home/workspace/fs1
[fs1] $ /bin/sh -xe /tmp/jenkins5648112374433508733.sh
+ echo hi
hi
Finished: SUCCESS
View heat tempest plugin import failures
Failed to import test module: heat_integrationtests.api.test_heat_api
Traceback (most recent call last):
File "/Users/hughsaunders/Documents/context/RE-645/maas_venv/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
module = self._get_module_from_name(name)
File "/Users/hughsaunders/Documents/context/RE-645/maas_venv/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
__import__(name)
File "/Users/hughsaunders/Documents/context/RE-645/maas_venv/lib/python2.7/site-packages/heat_integrationtests/api/test_heat_api.py", line 18, in <module>
from gabbi import driver
ImportError: No module named gabbi
View git functions
# git push force set upstream
gpfsu(){
branch=$(git symbolic-ref --short HEAD)
git push -f --set-upstream ${1:-origin} $branch
}
# git commit ammend
gca(){
#don't want to commit accidental submodule sha changes (eg when switching branches)
git submodule update
View Input
- defaults:
name: global
TEST_BOOL_DEFAULT: true
TEST_STRING_DEFAULT: "/opt/foo"
- parameter:
name: my_params
parameters:
- bool:
name: TEST_BOOL
default: "{TEST_BOOL_DEFAULT}"
View console.log
Started by user Hugh Saunders
[Pipeline] node
Running on rpc-jenkins-n02.prod.dfw1.cit.rackspace.net-9082c1d1 in /var/lib/jenkins/workspace/scratchpipeline
[Pipeline] {
[Pipeline] sh
[scratchpipeline] Running shell script
+ date
+ pwd
/var/lib/jenkins/workspace/scratchpipeline
+ ls
View output
ansible-playbook -i inventory/ test.yml
PLAY [localhost] ***************************************************************
TASK [debug] *******************************************************************
skipping: [localhost]
TASK [debug] *******************************************************************
skipping: [localhost]
View gist:f2e191e97bd46976e722a69748ef1cc0
SEVERE: Failed Loading plugin Jenkins Self-Organizing Swarm Plug-in Modules v3.3 (swarm)
java.io.IOException: Unable to load hudson.plugins.swarm.PluginImpl from swarm
at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:514)
at hudson.PluginManager$2$1$1.run(PluginManager.java:517)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:1085)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
View xunit.py
# This module was found in an ansible-discuss mailing list thread: https://groups.google.com/forum/#!msg/ansible-project/7VhqDDtf6Js/EcQ1MVoJRBIJ
# (C) 2013, Stephan Buys, <stephan.buys@gmail.com>
#
# This file is based on noop.py which is a part of Ansible, and is
# a derivative work as per the GPL. All original conditions apply.
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or