Skip to content

Instantly share code, notes, and snippets.

View DavidIAm's full-sized avatar

David Ihnen DavidIAm

View GitHub Profile
#!/usr/bin/perl -w
use XML::DOM;
my $d = new XML::DOM::Document;
my $R = $d->appendChild($d->createElement('REQUEST'))->appendChild($d->createElement('STOREREQUEST'));
$R->appendChild($d->createElement('LATITUDE'))->appendChild($d->createTextNode('lati'));
$R->appendChild($d->createElement('LONGITUDE'))->appendChild($d->createTextNode('long'));
$R->appendChild($d->createElement('TYPE'))->appendChild($d->createTextNode('type'));
@DavidIAm
DavidIAm / animaltree
Last active November 29, 2015 07:34
animal tree program
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdbool.h>
/* Structure is basic binary tree
* Data in node is an animal and a distinguisher question
* branches are 'yes' and 'no'
* Business rules:
* - if distinguisher is null, ask about the animal to determine win
@DavidIAm
DavidIAm / Face.java
Created February 18, 2016 19:22
Yatzy Kata for your review
package testpackage;
// This enum represents the sides on a six sided die.
// A die face can only be one of these six values.
// Not five.
// Not seven.
// Eight is right out.
public enum Face {
ONE, TWO, THREE, FOUR, FIVE, SIX;
public Integer value() {
<?xml version="1.0" encoding="UTF-8"?>
<AnyConnectProfile xmlns="http://schemas.xmlsoap.org/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.xmlsoap.org/encoding/ AnyConnectProfile.xsd">
<ClientInitialization>
<UseStartBeforeLogon UserControllable="false">false</UseStartBeforeLogon>
<AutomaticCertSelection UserControllable="false">true</AutomaticCertSelection>
<ShowPreConnectMessage>false</ShowPreConnectMessage>
<CertificateStore>All</CertificateStore>
<CertificateStoreOverride>false</CertificateStoreOverride>
<ProxySettings>Native</ProxySettings>
<AllowLocalProxyConnections>true</AllowLocalProxyConnections>
let mapleader = ","
nnoremap <leader>l :tabnext<return>
nnoremap <leader>h :tabprev<return>
map <F2> :tabprev<return>
map <F3> :tabnext<return>
set expandtab
set sw=4
set ts=4
syntax enable

Keybase proof

I hereby claim:

  • I am davidiam on github.
  • I am davidiam (https://keybase.io/davidiam) on keybase.
  • I have a public key ASCDHScxv94Q_qtJQwtj2NqPWuR16ov1fiI4g8T0clbhNAo

To claim this, I am signing this object:

Existing keystone pipeline and Commerce account
Waffle Iron Alpha - work with
Jenkins 2
Deploy application in docker
Jenkinsfile (branch control)
#!/usr/bin/env python
import time
import subprocess
import socket
import ssl
import inspect, os, sys
# From http://stackoverflow.com/questions/279237/python-import-a-module-from-a-folder
cmd_subfolder = os.path.realpath(os.path.abspath(os.path.join(os.path.split(inspect.getfile( inspect.currentframe() ))[0],"..")))
@DavidIAm
DavidIAm / log.extract
Created January 13, 2019 06:39
Weird cert wouldn't verify
ec2-user@ip-172-31-25-180:~/compose-work (git alpha) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [06:34:36]
$ docker run --rm -it de1f4cb61c4d cat /home/holder/pki/sshservermqttbridge.key > BADCERTsshservermqttbridge.key
ec2-user@ip-172-31-25-180:~/compose-work (git alpha) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [06:34:56]
$ docker run --rm -it de1f4cb61c4d cat /home/holder/pki/sshservermqttbridge.crt > BADCERTsshservermqttbridge.crt
ec2-user@ip-172-31-25-180:~/compose-work (git alpha) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [06:35:07]
$ md5sum pki/issued/sshservermqttbridge.crt
dff99beb7bf13035c3658c9379062f00 pki/issued/sshservermqttbridge.crt
ec2-user@ip-172-31-25-180:~/compose-work (git alpha) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [06:35:10]
$ md5sum BADCERTsshservermqttbridge.crt
b93aa2d1ab4843e724a8eac2be471be8 BADCERTsshservermqttbridge.crt
root@4e8cc29ea64e:/# ssh2controller
ssh2controller start instance 64136a65f59
enter main
connect to mqtt
subscribe in_topic controller/+/status
Scan complete
Choose controller
0) BBG116048488
1) wgd-18071321235
Type a partial and tab: wgd-18071321235