Skip to content

Instantly share code, notes, and snippets.

View kenpropel's full-sized avatar
:octocat:
Gitty…

Ken kenpropel

:octocat:
Gitty…
View GitHub Profile
@kenpropel
kenpropel / config.rb
Created March 22, 2024 05:23
Using AWS SSM Parameter Store to load configuration in Ruby
require 'aws-sdk-ssm'
require_relative './neko-logger'
L = Neko::Logger.logger
SSMPS_KEY_PATH = '/config/path/'
def config
# Skip if config was loaded within the last hour
if @config_loaded.nil? || (Time.now - @config_loaded > 3600)
L.info('Loading config from SSMPS')
@kenpropel
kenpropel / WebClientRepeat.ino
Created August 20, 2019 22:32
Arduino sample: repeating web client
/*
Repeating Web client
This sketch connects to a a web server and makes a request
using a Wiznet Ethernet shield. You can use the Arduino Ethernet shield, or
the Adafruit Ethernet shield, either one will work, as long as it's got
a Wiznet Ethernet module on board.
This example uses DNS, by assigning the Ethernet client with a MAC address,
IP address, and DNS address.
@kenpropel
kenpropel / WebClient.ino
Created August 20, 2019 22:27
Arduino sample: WebClient
/*
Web client
This sketch connects to a website (http://www.google.com)
using an Arduino Wiznet Ethernet shield.
Circuit:
* Ethernet shield attached to pins 10, 11, 12, 13
created 18 Dec 2009