Skip to content

Instantly share code, notes, and snippets.

View spjmurray's full-sized avatar

Simon Murray spjmurray

  • Nscale
  • Manchester UK
View GitHub Profile
@spjmurray
spjmurray / slack-icinga2.png
Last active May 11, 2016 13:22
Slack Icinga2
test
@spjmurray
spjmurray / [email protected]
Created January 30, 2016 22:06
Custom data in X509
simon@symphony:~/ssl/intermediate$ openssl x509 -text -noout -in ../user/[email protected]
Certificate:
Data:
Version: 3 (0x2)
Serial Number: 4100 (0x1004)
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=GB, ST=England, O=Acme Corp, OU=Acme Corp Certificate Authority, CN=Acme Corp Intermediate CA
Validity
Not Before: Jan 30 22:04:22 2016 GMT
Not After : Jan 29 22:04:22 2017 GMT
@spjmurray
spjmurray / gist:88203f564389294b3774
Created July 17, 2015 11:21
RGW Borkage With Civet on Giant
root@ujbspkp2lx7i87b:/home/ubuntu# tcpdump -i lo -A port 7480
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
11:17:45.968772 IP localhost.35153 > localhost.7480: Flags [S], seq 279482736, win 43690, options [mss 65495,sackOK,TS val 327790 ecr 0,nop,wscale 7], length 0
E..<..@[email protected].........
...n........
11:17:45.968786 IP localhost.7480 > localhost.35153: Flags [S.], seq 418520254, ack 279482737, win 43690, options [mss 65495,sackOK,TS val 327790 ecr 327790,nop,wscale 7], length 0
E..<..@.@.<..........8.Q.......q.....0.........
...n...n....
11:17:45.968799 IP localhost.35153 > localhost.7480: Flags [.], ack 1, win 342, options [nop,nop,TS val 327790 ecr 327790], length 0
@spjmurray
spjmurray / gist:7f70f8707c2734038f37
Last active August 29, 2015 14:25
Rados Gateway (giant) Malformed HTTP
12:48:32.575766 IP XXXX > XXXX: Flags [P.], seq 1:242, ack 285, win 219, options [nop,nop,TS val 2740734612 ecr 2743811027], length 241
E..%.;@[email protected]<
&
..........'s.....
.\J...;.HTTP/1.1 200 OK
Date: Thu, 16 Jul 2015 11:48:32 GMT
Server: Apache/2.4.7 (Ubuntu)
{"enabled": true,"max_size_kb":5000000000,"max_objects":-1}Status: 200 OK
@spjmurray
spjmurray / gist:adbaf3fd1171240d792b
Created May 8, 2015 12:05
ARM64 Guest HR Timer Fail
simon@paris:~$ cat /proc/timer_stats
Timer Stats Version: v0.3
Sample period: 0.000 s
Collection: inactive
0 total events
simon@paris:~$ cat /proc/timer_list
Timer List Version: v0.7
HRTIMER_MAX_CLOCK_BASES: 4
now at 1159709685909 nsecs
<?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Name>test</Name>
<Prefix></Prefix>
<Marker></Marker>
<MaxKeys>1000</MaxKeys>
<IsTruncated>false</IsTruncated>
<Contents>
<Key>summer.jpg</Key>
<LastModified>2014-10-02T14:44:38.000Z</LastModified>
#!/bin/bash
token='I858I8ZG0L80D9D8EQI8'
secret='cWIxgBEzPWmZcUsmbreXfT8gJvn9PIbCsQO9Bvtr'
query=$1
date=`date -Ru`
header="GET\n${content_md5}\n${content_type}\n${date}\n${query}"
sig=`echo -en ${header} | openssl sha1 -hmac ${secret} -binary | base64`
curl -X GET \
@spjmurray
spjmurray / gist:4aff2edba4353ef7bc00
Last active August 29, 2015 14:07
S3 Object Creation
#!/bin/bash
token='I858I8ZG0L80D9D8EQI8'
secret='cWIxgBEzPWmZcUsmbreXfT8gJvn9PIbCsQO9Bvtr'
query=$1
object=$2
date=`date -Ru`
header="PUT\n${content_md5}\n${content_type}\n${date}\n${query}"
sig=`echo -en ${header} | openssl sha1 -hmac ${secret} -binary | base64`
@spjmurray
spjmurray / gist:cc935c59569d1bff184d
Last active August 29, 2015 14:07
S3 Bucket Creation
#!/bin/bash
token='I858I8ZG0L80D9D8EQI8'
secret='cWIxgBEzPWmZcUsmbreXfT8gJvn9PIbCsQO9Bvtr'
query=$1
date=`date -Ru`
header="PUT\n${content_md5}\n${content_type}\n${date}\n${query}"
sig=`echo -en ${header} | openssl sha1 -hmac ${secret} -binary | base64`
curl -X PUT \
nova secgroup-add-rule 6c49300d-4c7b-4585-8796-f80798ff3523 icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule 6c49300d-4c7b-4585-8796-f80798ff3523 tcp 1 65535 0.0.0.0/0
nova secgroup-add-rule 6c49300d-4c7b-4585-8796-f80798ff3523 udp 1 65535 0.0.0.0/0