Skip to content

Instantly share code, notes, and snippets.

Avatar

Hugh Saunders hughsaunders

View GitHub Profile
@hughsaunders
hughsaunders / install.log
Created Jul 5, 2019
@airbnb/node-memwatch install failure
View install.log
Hughs-MacBook-Pro:~ hugh$ npm i -g leakage
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
> @airbnb/node-memwatch@1.0.2 install /usr/local/lib/node_modules/leakage/node_modules/@airbnb/node-memwatch
> node-gyp rebuild
CXX(target) Release/obj.target/memwatch/src/heapdiff.o
In file included from ../src/heapdiff.cc:12:
../src/heapdiff.hh:18:38: error: no template named 'Handle' in namespace 'v8'
static void Initialize ( v8::Handle<v8::Object> target );
@hughsaunders
hughsaunders / iperfplot.sh
Created Jun 19, 2019
IPerf network performance/throughput trend plot graph script
View iperfplot.sh
#!/bin/bash -xeu
# ENV Vars with defaults
IPERF_HOST="${IPERF_HOST:-mercury}"
IPERF_LOG="${IPERF_LOG:-iperf.10145.log}"
SPEED_CSV="${SPEED_CSV:-speed2.csv}"
OUTPUT_PNG="${OUTPUT_PNG:-throughput2.png}"
OUTPUT_SIZE="${OUTPUT_SIZE:-1000,500}"
INTERVAL="${INTERVAL:-60}"
View output
Started by user Hugh Saunders
Running in Durability level: PERFORMANCE_OPTIMIZED
[Pipeline] echo
before
[Pipeline] echo
I'm the CPS function
[Pipeline] End of Pipeline
Finished: SUCCESS
@hughsaunders
hughsaunders / zmqc.py
Created Dec 7, 2017 — forked from zacharyvoase/gist:1770447
zmqc: A small but powerful command-line interface to ZMQ.
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
@hughsaunders
hughsaunders / Input
Created Jun 27, 2017
Bool lower case problem
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}"
@hughsaunders
hughsaunders / console.log
Created Mar 15, 2017
Jenkins nested node, how to find the first workspace
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
You can’t perform that action at this time.