Skip to content

Instantly share code, notes, and snippets.

View pwood's full-sized avatar

Peter Wood pwood

View GitHub Profile
@pwood
pwood / wrap.go
Created February 10, 2022 11:39
Go AWS Lambda Generic Prototype
package lambdawrap
import (
"context"
"encoding/json"
"fmt"
"github.com/aws/aws-lambda-go/events"
"github.com/stretchr/testify/assert"
"io"
"io/ioutil"
@pwood
pwood / gist:3efae439575e51065dbc4266a9dff7f1
Created November 27, 2019 20:30
Example of Role with sts:ExternalId
"SumoLogicRole": {
"Type": "AWS::IAM::Role",
"Properties": {
"Path": "/",
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": [
"sts:AssumeRole"
],
@pwood
pwood / ssm.json
Created September 24, 2018 08:51
"SSMCredentialPolicy": {
"Type": "AWS::IAM::Policy",
"Properties": {
"Roles": [
{
"Ref": "FetcherTaskRole"
}
],
"Users": [
{
//scalastyle:off
trait ConfigurationProvider {
def apply(key: String): Option[String]
}
object NullConfigurationProvider extends ConfigurationProvider {
override def apply(key: String): Option[String] = None
}
@pwood
pwood / gd-webserver.pp
Created January 28, 2015 09:47
Webserver
class profile::gd_webserver inherits profile::gd_base {
firewall { '080 Web Server (HTTP)':
proto => 'tcp',
dport => '80',
action => 'accept'
}
firewall { '081 Web Server (SSL)':
proto => 'tcp',
dport => '443',

Keybase proof

I hereby claim:

  • I am pwood on github.
  • I am melair (https://keybase.io/melair) on keybase.
  • I have a public key whose fingerprint is B137 18A6 A912 1EB2 DA7D B5F5 61DF B231 BBF7 2AC3

To claim this, I am signing this object:

[global]
netbios name = neon
workgroup = ALASTRIA
security = ADS
realm = ALASTRIA.LAN
encrypt passwords = yes
local master = no
domain master = no
require 'yaml'
require 'pp'
import = "/home/server/Caldonia/plugins/Residence/Save/Worlds/res_world.yml-orig"
plots = {
"Emerald" => { :position => 0, :side => 0, :floor => 0 },
"Iron" => { :position => 1, :side => 0, :floor => 0 },
"White" => { :position => 2, :side => 0, :floor => 0 },
"Orange" => { :position => 3, :side => 0, :floor => 0 },
@pwood
pwood / etc-auto.master
Created August 9, 2012 17:23
Automount
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#
#/misc /etc/auto.misc
#
# NOTE: mounts done from a hosts map will be mounted with the
# "nosuid" and "nodev" options unless the "suid" and "dev"
@pwood
pwood / RTUServer.rb
Created June 26, 2012 13:56
Home Modbus
# Set up the serial
require 'rubygems'
require 'rmodbus'
# Start Modbus server
srv = ModBus::RTUViaTCPServer.new(10002,1, {:host => "0.0.0.0"})
srv.start
# Data
data = [ 0 ] * 15