Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Peter Souter petems

🏠
Working from home
Block or report user

Report or block petems

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
@petems
petems / gist:ec2a722f3bb7c8614c277958a759b420
Created Mar 2, 2019
Create snapshot from Azure blob url
View gist:ec2a722f3bb7c8614c277958a759b420
createSnapshot, err := blockBlobURL.CreateSnapshot(ctx, azblob.Metadata{}, azblob.BlobAccessConditions{})
if err == nil {
createSnapshot.Snapshot()
snapshot := createSnapshot.Snapshot()
snapshotBlobURL := blockBlobURL.WithSnapshot(snapshot)
l.logger.Printf("Created Azure Blob Snapshot - %s", snapshotBlobURL)
} else {
l.logger.Printf("Attempt to create blob snapshot failed - %s - Skipping", err)
}
View gist:109a77ccff3187dc0deb85a0e3f3ad89
Vagrant.require_version ">= 2.0.0"
Vagrant.configure("2") do |config|
config.vm.define "statsbox", autostart: true do |statsbox|
statsbox.vm.box = "bento/ubuntu-16.04"
statsbox.vm.provider "virtualbox" do |vb|
vb.linked_clone = true
vb.memory = "1024"
end
@petems
petems / pub_key.pp
Last active Jun 11, 2018
SSH Pub Key
View pub_key.pp
file { '/home/psouter/.ssh':
ensure => directory,
owner => 'psouter',
group => 'psouter',
mode => '0700',
}
-> ssh_authorized_key { 'hashicorp-laptop-key@homedir':
ensure => present,
user => 'psouter',
View keybase.md

Keybase proof

I hereby claim:

  • I am petems on github.
  • I am petersouter (https://keybase.io/petersouter) on keybase.
  • I have a public key whose fingerprint is 0CAF 42ED EB4E 16B4 243F 8148 AE3A 33F6 B70C 5AFD

To claim this, I am signing this object:

@petems
petems / catalina.json
Created Jul 7, 2017
Some example jmxtrans.json configs
View catalina.json
{
"servers": [
{
"host": "foo",
"port": "9010",
"alias": "catalina.java",
"queries": [
{
"obj": "java.lang:type=ClassLoading",
View gist:d3d688aae2e89ad5a42a9d9e7cc04c7a
require 'graphite-api'
require 'socket'
require 'net/http'
require 'uri'
require 'json'
hostname = Socket.gethostname
client = GraphiteAPI.new(
graphite: "localhost:2003",
View 10-epoch_curl.conf
LoadPlugin curl_json
<Plugin curl_json>
<URL "http://date.jsontest.com/">
Instance "epoch"
<Key "milliseconds_since_epoch">
Type "count"
</Key>
</URL>
</Plugin>
View gist:f8ca6f823b8e9937e4bf92737b228a6f
self | tot | method
100.0% | 33.3% | hide_original_method : /root/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/mocha-1.2.0/lib/mocha/class_method.rb
View centos-64-x64-2-hosts.yml
HOSTS:
database:
roles:
- default
- database
platform: el-6-x86_64
box : centos-64-x64-vbox4210-nocm
box_url : http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210-nocm.box
hypervisor : vagrant
client:
You can’t perform that action at this time.