This is a Go script that can be deployed to AWS Lambda and returns the caller's IP address formatted in JSON.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![no_std] | |
#![no_main] | |
use arduino_hal::hal::port::{PD3, PD5, PD6}; | |
use arduino_hal::pac::TC0; | |
use arduino_hal::port::mode::{Analog, Input, Output, PwmOutput}; | |
use arduino_hal::port::{mode, Pin, PinOps}; | |
use arduino_hal::prelude::*; | |
use arduino_hal::simple_pwm::{IntoPwmPin, PwmPinOps, Timer0Pwm, Timer2Pwm}; | |
use arduino_hal::{DefaultClock, Peripherals, Pins, Usart}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo yum install -y https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm | |
sudo yum install -y mysql-community-client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "VisualEditor0", | |
"Effect": "Allow", | |
"Action": [ | |
"route53:GetHostedZone", | |
"route53:ChangeResourceRecordSets", | |
"route53:ListResourceRecordSets" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Uses AWS CLI and user-provided MFA code to retrieve and store | |
# temp session credentials from AWS Security Token Service (STS), | |
# - for user sessions via get-session-token | |
# - or role sessions via assume-role | |
# | |
# Stores 'token_expiration' in the profile to enable checks on session time left | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
##################################################### | |
# Author: Shinichi Okada | |
# Version : v0.0.3 | |
# Date: 2021-03-20 | |
##################################################### | |
# Clean up | |
unset FROM TO dir_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host rpi1 | |
HostName raspberrypi1.local | |
User pi | |
Host rpi2 | |
HostName raspberrypi2.local | |
User pi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Security audit | |
on: | |
schedule: | |
- cron: '0 0 * * *' | |
push: | |
paths: | |
- '**/Cargo.toml' | |
- '**/Cargo.lock' | |
jobs: | |
security_audit: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
set -o pipefail | |
echo "Start validation $1" | |
BRANCH=$(git branch -r --contains ${GITHUB_SHA} | grep "") | |
RELEASE_VERSION=$(echo ${GITHUB_REF} | sed -e "s/refs\/tags\///g" | sed -e "s/\//-/g") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DOMAIN= # insert your domain here (e.g. example.com) | |
STACK= # choose a name for your stack | |
REGION=us-east-1 # the ACM certificate must be in us-east-1 | |
aws cloudformation deploy --template-file https_s3_website.yaml \ | |
--stack-name $STACK \ | |
--region $REGION \ | |
--parameter-overrides DomainName=$DOMAIN | |
# push the website source to the s3 bucket - assuming it is contained in src/ |
NewerOlder